Good point. Anyone who has worked with regexes in the various languages can
attest to subtle (but far-reaching) differences between them. I recall the
first time I picked up the "Mastering Regular Expressions" book. A veritable
Bible for the beasties...

-----Original Message-----
From: David A. Black [mailto:dblack / wobblini.net] 
Sent: Thursday, April 07, 2005 9:09 AM
To: ruby-talk / ruby-lang.org
Subject: Re: Regular expression mismatch ?


Hi --

On Thu, 7 Apr 2005, Han Holl wrote:

> On Apr 7, 2005 12:34 PM, David A. Black
>> The /m suffix means that \n is included in . (dot).
>>
> Yes, looked it up in the Pickaxe, and indeed that's what it says.
>
> This is from man perlre:
>       m   Treat string as multiple lines.  That is, change "^" and "$"
>    from matching the start or end of the string to matching then
>    start or end of any line anywhere within the string.
>
> This should go on the page I've seen somewhere with gotchas. Perl RE 
> is quite widespread, and when ruby deviates from it it's easy to trip 
> up.

Not if you use Ruby more and more :-)


David

-- 
David A. Black
dblack / wobblini.net