W3C home > Mailing lists > Public > www-style@w3.org > March 1998

Re: OPINIONS WANTED: regexps in CSS?

From: Albert Lunde <Albert-Lunde@nwu.edu>
Date: Tue, 10 Mar 1998 22:52:02 -0600
Message-Id: <v03110700b12bc30eab32@[]>
To: www-style@w3.org
I'm personally rather fond of Perl regular expressions, and I think they
are rather expressive. But I think it would be non-trivial to specify them
without just swiping the code. And if you don't pin down who's varient of
regular expressions you mean, interoperablity goes to hell fast.

(But, Javascript seems like a worse solution to put in what's trying to be
a declaritive language.)

I seem to recall there were also some security issues once related to the
side effects of perl regular expressions.

Regular expressions can use so many assorted characters that they can also
be a pain to "quote" in other contents.

I'd be tempted to try for the same expressive power in a more verbose
syntax: I once used a homegrown mainframe editor that used pattern matching
loosely based on SNOBOL functions. But then people would have to learn
another arcane syntax. (The advantage was you could make, say "*", mean
whatever you wanted it to mean in a particular context.)

For what it's worth, regarding complexity, Henry Spencer's regular
expression code, as shipped with Apache 1.2.5, contains a little over 100K
or 4200 lines of C code. He claims to implement Posix 1003.2 Regular
expressions. So I guess there's a spec to point at of you want one.

    Albert Lunde                      Albert-Lunde@nwu.edu
Received on Tuesday, 10 March 1998 23:53:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:46 UTC