On 17/08/05, Brian Foster <blf at blf.utvinternet.ie> wrote:
> > From: Stephen Reilly <leydar at gmail.com>
> > Perhaps something along the lines of:
> > sed "s#'\([a-zA-Z0-9-_.]*\)' <\(\([a-zA-Z0-9-_.]*\)@[a-zA-Z0-9-_]*\.[a-zA-Z0-9-_]*\)>#\<a href='thing?\1'\>\1\<\\a\> \<a href='mailto:\2'\>mail \3\<\\a\>#g" filename
> obvious minor mistake — assuming John is trying
> to generate HTML — it is </a> not <\a>.
Nuts, indeed, foreward slash, well spotted.
> not knowing exactly what John's input is like,
> I wonder if having such specific REs is a good
> idea; e.g., if '\([^']*\)' or similar would
> be better for the Looney part? and likewise for
> the other bits, which are left as an exercise
> for the reader.
Well the other bits could be liberated a bit more if I had the
patience to google for email validating regular expressions/rules
which no doubt are there in abundance :) Email harvester traps and
honeypots notwithstanding people often obscure their email addresses
swapping "." with "dot" and so on (my really obscured but functional
mailto is below). From what he said I'd imagine the sed statement will
suffice. I've already started winding up awk just in case of
complications and am currently waiting for it to reach full power. The
lights have already started to dim so it shouldn't be long now..
obfuscated mail straightens itself out in a browser: <a
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!