Re: including . in a pattern match



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
.



Relevant Pages

  • Re: Chord connection
    ... i.e. Accents don't come from meter but meter ... Maybe I need a better definition of accent. ... Pattern Accent - a stress created by a repetitive pattern (making the first ...
    (rec.music.theory)
  • Re: Why float is called as float, not real?
    ... Lane Straatman wrote: ... to prove mathematical theorems? ... Perhaps we mean different things by "pattern". ...
    (comp.lang.fortran)
  • Re: The Case for a Designer
    ... There must have been guidance - i.e. intelligent intervention - for this to ... I don't see how a rapid change in head size is more impressive than ... There is a pattern here. ...
    (talk.origins)
  • Re: ID vs. reproduction or evolution
    ... >>The point that I was trying to make is that a pattern that would be ... i'd argue that at least for SETI simplicity is the criterion. ... our own sun transmits signals that are highly complex by any ...
    (talk.origins)
  • Re: Matter is relative like Space and Time
    ... >> what is the practical benefit? ... > It simplifies our knowledge for one. ... Have you learned calculus yet? ...
    (sci.physics)