[thelist] RegExp in ASP for validating e-mail and URLs?

Alex Beston alex at deltatraffic.co.uk
Wed Nov 10 06:16:02 CST 2004


Peter Bornhall wrote:

> Hey, first post this!
>
> Is anyone sitting on good regexp functions (return true if valid, 
> otherwise false) for validating e-mail addresses and web URL:s?
>
> Best-case scenario, I'm looking for a function that searches through a 
> portion of text and finds valid e-mail addresses and replaces them 
> with <a href="mailto:-address here-">-address here-</a>.  Same goes 
> for URL:s, where it would be nice to do the same for valid links.  
> What would be an extra addition would be that it would recognize 
> already formatted e-mail and link URL:s in the text, and ignore them 
> (or at least not break them).  URL:s would be formatted as above, but 
> with the "http://" and "ftp://" and such removed from the link text.  
> I.e. "http://www.domain.com" in the text would yield '<a 
> href="http://www.domain.com">www.domain.com</a>' in the end...
>
> Anyone who can regexp this?  Personally, I suck at regexps...:-(
>
> - Peter

i have done extensive work on this

mail me off list

-- 
Alex Beston
Business Director
deltaTraffic
Tel: 01273 691234
www.deltatraffic.co.uk



More information about the thelist mailing list