Hi, I'm trying to mimic the TGML code on here or in UBB -- but I'm having a problem with Regular Expressions matching too much, I thought that the engine would find the first match of an occurence and match it, however it's going to the end of the string .+ and doing the replace there. For example:
I want to take string:
and have it match with:
REReplaceNoCase(string, "\*)\](.*)\[/url\]","<a href=""\1"" target=""_blank"" class=""underline"">\2</a>","ALL")
However, it is matching the ENTIRE string, rather then matching 3 times seperately. Any help? I've tried:
\[url=(^\]*)\][^[\[/url\]]*\[/url\]
as well, but it doesn't seem to like grouped strings ... Using Coldfusion MX 7
I want to take string:
Code:
[url=http://www.tek-tips][img]imgsrc[/img][/url]
[url=http://www.tek-tips][img]imgsrc[/img][/url]
[url=http://www.tek-tips][img]imgsrc[/img][/url]
REReplaceNoCase(string, "\*)\](.*)\[/url\]","<a href=""\1"" target=""_blank"" class=""underline"">\2</a>","ALL")
However, it is matching the ENTIRE string, rather then matching 3 times seperately. Any help? I've tried:
\[url=(^\]*)\][^[\[/url\]]*\[/url\]
as well, but it doesn't seem to like grouped strings ... Using Coldfusion MX 7