On 18/04/2006, at 1:44 PM, Christer Olsson wrote:

I'm trying to write a regex for extracting URLs, and have one tricky case I can't catch. I'm now using the following (greedy) regex

(http|https)://(((.*):(.*)@)?)(@)?([^:>/\s""]*)
but will fail on this

http://@www.foo.com:80/[EMAIL PROTECTED]

Just a quick confirmation in BBEdit,

(http|https)://((@)|((.*):(.*)@)?)([^:>/\s""]*)

seems to work and keeps the standalone @ as \2 which seemed to be what you wanted

I use a lot of regex but confess to not having tried it RB (I spend days in XSLT & XML Schema).

regards

Andy

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to