On 1/27/06, Keith Worthington <[EMAIL PROTECTED]> wrote:
snip
>  I have tried a couple of things but I am struggling with how to optionally
> match the decimal point.
>
> I think what I need is the code equivilant of:
>    zero or more numbers followed by
>    zero or one decimal point followed by
>    one or more numbers followed by
>    either ' or "
snip

Take a look at Regexp::Common
(http://search.cpan.org/~abigail/Regexp-Common-2.120/lib/Regexp/Common.pm).
 What you want is $RE{num}{real} out of that package.  It will match
any real number.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to