add the [:punct:] class to the exclude? ReReplace(Attributes.showBlurb,"(((mailto)|((http)|(ftp)\/\/))\:[^[:space:]| [:punct:]]+)", '<a href="\1">\1</a>',"ALL")
> -----Original Message----- > From: Stephen Moretti [mailto:[EMAIL PROTECTED] > Sent: 05 June 2003 17:37 > To: [EMAIL PROTECTED] > Subject: [ cf-dev ] More Regex... > > > I have this : > > ReReplace(Attributes.showBlurb,"(((mailto)|((http)|(ftp)\/\/)) > \:[^[:space:]] > +)", '<a href="\1">\1</a>',"ALL") > > It looks for mailto: http: ftp: and a string and sticks the > string it finds > into an href. It all works fine, except that if there is > something on the > end of the string, say a full stop or a bracket etc, then > those get included > in the URL > > http://www.thisismysite.com. > becomes > <a > href="http://www.thisismysite.com.">http://www.thisismysite.com.</a> > > Anyone have some better regex for this or a way of fixing the > replace, so > that it does grab those invalid characters on the end of the > URL string? > > Stephen > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
