On Mon, 16 Jan 2006 16:01:48 +0100, Tom Allison <tallison / tacocat.net> wrote: > dblack / wobblini.net wrote: >> /s turns on SJIS encoding, so you probably don't want that. As for >> all the multiline matching, etc., /m causes the wildcard dot to match >> newline characters, like /s in Perl. You don't need an equivalent of >> Perl's /m because ^ and $ already always match beginning/end of lines. >> To match beginning/end of string, you use anchors: \A and \z (or \Z to >> discount a final newline). > > There's a lot of differences to get used to here. > I'm surprised that Ruby would go contrary to Perl in the regex flags. > It's bound to be a source of confusion, at least for myself. > AND here's a completely new regexp engine coming for 2.0 - fun for the whole family. That said, although it's undesirable, noone's obliged to be completely PCRE-compatible, and it always pays to take five minutes to read the (IMO pretty clear as far as regexps are concerned) documentation.