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

Re: OPINIONS WANTED: regexps in CSS? (Re: Suggestion for Attribute Selectors)

From: Victoria Rosenfeld <jiggy@holly.ColoState.EDU>
Date: Tue, 10 Mar 1998 10:46:53 -0700 (MST)
To: Stephanos Piperoglou <sp249@cam.ac.uk>
cc: Bert Bos <Bert.Bos@sophia.inria.fr>, www-style@w3.org
Message-ID: <Pine.A41.3.95.980310104246.108768A-100000@holly.ColoState.EDU>

On Tue, 10 Mar 1998, Stephanos Piperoglou wrote:

> I've sent this personally in order to avoid flooding the list with
> responses. If this wasn't your intention, please bounce it back to the list.
> On Tue, 10 Mar 1998, Bert Bos wrote:
> >  1. will this regexp-selector:
> >         COL[WIDTH="^ *[0-9]+(\.[0-9]+)? *(\*|px|%)? *$"]
> >     match this HTML?
> >         <COL width=".9px">
> Nope, for several reasons. It's rather ugly.
> >  2. please send me your attempt at writing a regexp that matches "fr",
> >     "fr-ca", "fr-fr", "fr-ca-quebec" (in both upper- and lowercase),
> >     etc, but not "franc" or "free" or "fr!" or "de-fr".
> /^fr(-\w*)*$/i
> (That's Perl regexp, with the /i for case-insensitive, and \w for
> alphanumeric characters). There are at least 10 other ways of doing it, some
> probably more efficient and shorter. I just came up with this at the top of
> my head.
> >  3. how easy is it for you to write such a regexp?
> Piece of cake.. But then again I'm fluent in Perl and that comes as a bonus.
> >  4. if you can't write it, would it be hard to learn, do you think?
> About as hard as looking up a good piece of documentation like perlre(1).
> >  5. can you estimate how easy/hard it is for other people?
> The lay user designing John Q. Public's Homepage? Impossible. The advanced
> computer user could learn it in a minute.

If "advanced" means: "users fluent in Perl" ... how many people do you
think will be in this audience? The use of these REs seems to go counter
to what the web is all about, and it *ain't* about having the "advanced"
users be the only ones to use it to the fullest.

Javascript seems like the way to go, in general. Slightly complicated, but
very powerful *and* can be implemented at it's basic level (mouse overs,
popup windows, et all) fairly easily. Perl is a bitch to learn & I shudder
at the thougt of having to become "advanced" enough to use (what is
potentially) a great functionality such as CSSes.

> -- Stephanos Piperoglou -- sp249@cam.ac.uk -------------------
> All I want is a little love and a lot of money. In that order.
> ------------------------- http://www.thor.cam.ac.uk/~sp249/ --
Received on Tuesday, 10 March 1998 12:47:01 UTC

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