![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
It’s just occurred to me that, since I’ve had reason to start occasionally using java.util.regex in ColdFusion code, I’m now programming with five incompatible regexp engines, which is nice. That’s Perl 5.8, CFMX 7, java 1.4.2, MySQL 5 and the LCD of current browser javascript regexp implementations. Then there’s the Emacs Lisp variant in XEmacs, and grep itself, neither of which is the same as any of the preceding.
Mostly it’s not too horrific, but remembering what supports +ve/-ve lookahead/lookbehind assertions, and which combination of character class syntax definitions both work and work in the same way is… irritating. Is ‘\w’ [a-zA-Z0-9_] or [\p{L}\p{N}_]? Why doesn’t java do POSIX named entities? Why doesn’t CFMX 7, which AFAIAA actually uses the java engine under its hood, support UNICODE \p{} escapes? Why on Earth does MySQL 5 reverse the meanings of ‘\’ and ‘\\’?
I’ll shut up now.
Mostly it’s not too horrific, but remembering what supports +ve/-ve lookahead/lookbehind assertions, and which combination of character class syntax definitions both work and work in the same way is… irritating. Is ‘\w’ [a-zA-Z0-9_] or [\p{L}\p{N}_]? Why doesn’t java do POSIX named entities? Why doesn’t CFMX 7, which AFAIAA actually uses the java engine under its hood, support UNICODE \p{} escapes? Why on Earth does MySQL 5 reverse the meanings of ‘\’ and ‘\\’?
I’ll shut up now.
(no subject)
Date: 2007-09-18 02:02 pm (UTC)(no subject)
Date: 2007-09-18 02:46 pm (UTC)*boggle*
(no subject)
Date: 2007-09-18 03:13 pm (UTC)(no subject)
Date: 2007-09-18 02:45 pm (UTC)(no subject)
Date: 2007-09-18 03:20 pm (UTC)Back in the days of ColdFusion 5, I had code that was an order of magnitude faster if I wrote a file in CF, shelled out to perl script that wrote its filtered output to another file, and read that file back into CF, than if I wrote the same expressions using CF's own regexp functions.