On 12/17/06, Robert Rothenberg <rob...@gmail.com> wrote:
Bad comparison: traditional regexps are much easier to read than the ones used in contemporary programming languages.
PCRE-style regexp in Javascript: regexp = /(\d{1,3}\.){3}\d{1,3}/; Traditional POSIX regexp in C: char regexp[] = "\\([:digit:]\{1,3\}\\.\\)\\{3\\}[:digit:]\\{1,3\\}"; The second one is clearly the more horrific of the two hateful messes, but I'll give you that it's *way* more fun to type if you just can't get enough joyful bouncing on the backslash key. (And traditional POSIX holds an even deeper hate - backslashes EITHER switch a character from being a literal to a metacharacter, OR from a metacharacter to a literal, depending on the character in question. Consistency's for suckers, clearly.) -- Yoz