From: Abigail Date: Tue, 30 Jul 2002 09:52:02 +0000 (-0700) Subject: pod/perlfaq4.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f0f835c2976ada1bb00d5ec52c67c4546ac5d689;p=p5sagit%2Fp5-mst-13.2.git pod/perlfaq4.pod Message-id: <20020730095202.A6462@ucan.foad.org> Add references to Regexp::Common. p4raw-id: //depot/perl@17710 --- diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index 18d7091..f251205 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -575,8 +575,9 @@ matter how complicated. To find something between two single characters, a pattern like C will get the intervening bits in $1. For multiple ones, then something more like C would be needed. But none of these deals with -nested patterns, nor can they. For that you'll have to write a -parser. +nested patterns. For balanced expressions using C<(>, C<{>, C<[> +or C<< < >> as delimiters, use the CPAN module Regexp::Common, or see +L. For other cases, you'll have to write a parser. If you are serious about writing a parser, there are a number of modules or oddities that will make your life a lot easier. There are @@ -1926,7 +1927,9 @@ Assuming that you don't care about IEEE notations like "NaN" or You can also use the L module on the CPAN, which exports functions that validate data types -using these and other regular expressions. +using these and other regular expressions, or you can use +the C module from CPAN which has regular +expressions to match various types of numbers. If you're on a POSIX system, Perl's supports the C function. Its semantics are somewhat cumbersome, so here's a C