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

Re: Suggested COMPROMISE for regexps (was: OPINIONS WANTED: regexps in CSS?)

From: Victoria Rosenfeld <jiggy@holly.ColoState.EDU>
Date: Fri, 13 Mar 1998 14:25:17 -0700 (MST)
To: Steven Pemberton <Steven.Pemberton@cwi.nl>
cc: www-style@w3.org
Message-ID: <Pine.A41.3.95.980313142404.92242D-100000@holly.ColoState.EDU>
Good God, man! You actually have that on a page somewhere?!? Can you list
the URL? (I ask with that some sort of mobidity that makes me look out the
window when I pass that accident :)


On Fri, 13 Mar 1998, Steven Pemberton wrote:

>  > *no opinion*
>  > Stephanos Piperoglou
>  > Steven Pemberton
> 
> This isn't a voting forum, and we weren't asked for a vote either, but 
> I just want to make it clear that just because I didn't say in a mail 
> whether or not I thought REs should be in CSS doesn't mean I don't
> have an opinion!
> 
> For the record I don't think REs are a good solution for CSS. Just
> look at this thread: at least two of the RE experts got the wrong
> answer to to Bert's original question (and I was one of them).
> 
> And now, to lighten your day, here are the regexps I used to match email
> addresses and URLs in order to make them clickable. The files in this 
> case were 300 submissions to a conference, and the regexps for the
> mail addresses were heuristically built to match what was in those
> files.
> 
> Enjoy!
> 
>  sed '/mailto:/!s/[a-zA-Z0-9][a-zA-Z0-9+\\._\\/\\-]*@[a-zA-Z0-9\\._\\-]*[a-zA-Z0-9]/<A HREF="mailto:&">&<\/A>/g
>       s/\([^"]\)\(http:\/\/[a-zA-Z0-9_\\.\/~\#\\-]*[a-zA-Z0-9_\/]\)/\1<A HREF="\2">\2<\/A>/g
>       s/^http:\/\/[a-zA-Z0-9_\\.\/~\#\\-]*[a-zA-Z0-9_\/]/<A HREF="&">&<\/A>/
>       s/\([^"]\)\(ftp:\/\/[a-zA-Z0-9_\\.\/~\\-]*[a-zA-Z0-9_\/]\)/\1<A HREF="\2">\2<\/A>/g
>       s/^ftp:\/\/[a-zA-Z0-9_\\.\/~\\-]*[a-zA-Z0-9_\/]/<A HREF="&">&<\/A>/g
>       s/{\([^|,;@}]*\)\([|,;][^}]*}[ ]*@[ ]*\)\([a-zA-Z0-9_\\.\\-]*[a-zA-Z0-9]\)/{<A HREF="mailto:\1@\3">\1<\/A>\2\3/
>       s/\({[^}]*[,;|][ ]*\)\([^<,;|@}]*\)}[ ]*@[ ]*\([a-zA-Z0-9_\\.\\-]*[a-zA-Z0-9]\)/\1<A HREF="mailto:\2@\3">\2<\/A>}@\3/
>       :try
>       s/\([|,;][ ]*\)\([a-zA-Z0-9_\\.\\-+]*\)\([,;|][ ]*[^}]*}[ ]*@[ ]*\)\([a-zA-Z0-9_\\.\\-]*[a-zA-Z0-9]\)/\1<A HREF="mailto:\2@\4">\2<\/A>\3\4/g
>       t try'
> 
> Steven Pemberton
> 
> 
Received on Friday, 13 March 1998 16:25:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:54 GMT