From: dblack@... Date: 2006-01-17T11:42:19+09:00 Subject: Re: regex Hi -- On Tue, 17 Jan 2006, Tom Allison wrote: > >> >> 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. >> > > Considering that PCRE is pretty much a language in itself, it would make life > a hell of a lot easier if there was at least some effort to either stick to > the established norms of regex engines or at least avoid treading on them in > the name of being different. regexp isn't trivial, making it more varied > from language to language isn't going to help matters much. Then you'll have to blame Perl, for breaking away from sed :-) There's really never been one regex syntax, across all these various languages and utilities; it's a very, very unlikely area for uniformity. In any case, Perl didn't necessarily get everything right -- for example, it's nice to have anchors for all possible combinations of start/end and string/line, as Ruby does. (Maybe recent Perls do too; I'm not sure.) David -- David A. Black dblack@wobblini.net "Ruby for Rails", from Manning Publications, coming April 2006! http://www.manning.com/books/black