Re: OPINIONS WANTED: regexps in CSS?

Ian Hickson <> writes:

> Ian Graham said:
> >I now tend to think that adding regex stuff would simply cloud this
> >simplicity, and make the whole thing harder to use.
> Not at all, since no one is *required* to use regexp. Just the same as
> having regexp in editors' find and replace dialog boxes doesn't mean
> everyone *has" to use them.

  Exactly... I don't think anyone is arguing for REs being the only way to
do complex selectors.  Its trivial to munge a glob-style wildcard to a
valid regular expression (that's what I do in Aventail's products) - that
way you can use whichever you feel more comfortable with.

> >Too slow or cumbersome to implement

> Well, we hear from Bill that:

> >  Regular expressions are not that expensive if you precompile them and
> >just keep the regex_t hanging around instead of the much less efficient
> >way of just recompiling the regexp every time.  This is similar to what
> >the perl 'study' command does for regexps I believe.
> >
> >  And like someone pointed out before, regular expressions have been
> >around for years, and highly efficient (and free :) implementations
> >exist for just about any platform.  I personally use regexps on 15
> >different platforms (mostly unix, but occasionally crosses over to NT/95
> >just fine) in my own programs.
> So I guess css implementors can always ask Bill for help :-) (sorry bill!)

  That's fine with me.  I would recommend we stick with POSIX regexps - I
really don't see too many people needing perl-style backtracking or
anything like that.

-Bill P.

Received on Wednesday, 11 March 1998 18:23:41 UTC