Re: including . in a pattern match
- From: chas.owens@xxxxxxxxx (Chas Owens)
- Date: Fri, 27 Jan 2006 16:18:21 -0500
On 1/27/06, Keith Worthington <keithw@xxxxxxxxxxxxxxxxx> 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.
.
- Follow-Ups:
- Re: including . in a pattern match
- From: Chas Owens
- Re: including . in a pattern match
- References:
- including . in a pattern match
- From: Keith Worthington
- including . in a pattern match
- Prev by Date: Re: including . in a pattern match
- Next by Date: Re: including . in a pattern match
- Previous by thread: Re: including . in a pattern match
- Next by thread: Re: including . in a pattern match
- Index(es):
Relevant Pages
|
|