Re: including . in a pattern match
- From: keithw@xxxxxxxxxxxxxxxxx (Keith Worthington)
- Date: Mon, 30 Jan 2006 12:07:01 -0500
On Mon, 30 Jan 2006 10:26:51 -0500, Chas Owens wrote
> On 1/30/06, Keith Worthington <keithw@xxxxxxxxxxxxxxxxx> wrote:
> snip
> > Wow, it is going to take me some time to wrap my head around
> > this code. I really like the commenting idea. That certainly
> > will help the next time around. I don't get the lines where
> > you defined the pattern.
> > i.e. my $border = qr{ cool_pattern_stuff }xi
> > Hmm is qr something special? I guess I will start with the x
> > modifier man page.
> snip
>
> Yes, it is the "quote regex" operator. It takes a string and returns
> a compiled regex. You can read more at "perldoc perlop" and "perldoc
> perlre".
Chas,
Thanks. I will run off to that man page.
I am considering that change the next time around. It certainly simplifies the
area where I am trying to perform the main match. It does however introduce a
little confusion for a newbie such as myself haveing a variable contain a
variable sort of thing.
The challenge that I am working on now is that although the $RE{num}{real}
simplifies the match of real numbers it does not appear to help me with
fractions. i.e. 36 1/2' Sighhhhh. I looked through Regexp::Common::number and
didn't see anything that pattern matched fractions. A search turned up
Number::Fraction but that doesn't seem to be about pattern matching.
I guess I will try to roll my own using the qr operator. A learning day! ;-)
Thanks for all your help.
Kind Regards,
Keith
.
- References:
- including . in a pattern match
- From: Keith Worthington
- Re: including . in a pattern match
- From: Chas Owens
- Re: including . in a pattern match
- From: Chas Owens
- Re: including . in a pattern match
- From: Keith Worthington
- Re: including . in a pattern match
- From: Chas Owens
- including . in a pattern match
- Prev by Date: Re: Hash problem
- 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
|
|