>- see footer for list info -<
Another way:
<cfset str = "I have [email [EMAIL PROTECTED]/email] in
some text">
<cfoutput>
<p>BEFORE: #str#</p>
<p>AFTER: #REReplace(str, "(.*)\[email (.*)](.*)\[/email\](.*)", '\1<a
href="mailto:\2">\3</a>\4', "ALL")#</p>
</cfoutput>
Can someone attempt to pick holes in that. I like RegEx but I always feel
I'm missing something. I'm sure there could be some ? in there...
Ade
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Simon Baynes
Sent: 30 June 2006 11:45
To: Coldfusion Development
Subject: Re: [CF-Dev] regex help....
>- see footer for list info -<
Here you go:-
<cfscript>
test = "[email [EMAIL PROTECTED]/email]";
test2 = reReplaceNoCase(test,
"\[email\s([^\]]*)\]([^\]]*)\[/email\]", '<a
href="mailto:\1">\2</a>');
</cfscript>
<cfoutput>#test2#</cfoutput>
On 6/30/06, Stephen Moretti <[EMAIL PROTECTED]> wrote:
> >- see footer for list info -<
> Struggling a bit today - brain is even less active than normal....
>
> I have [email [EMAIL PROTECTED]/email] in some text
> which I need to turn into <a
> href="mailto:[EMAIL PROTECTED]">sometext</a>
>
> I'm sure I can do this with a bit of regex, but brain isn't
> engaging..... Any pointers pretty please?
> _______
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<