Hey all. I'm trying to cook up a regexp to search a block of text for links.
What I'm looking for is something like:
 
<a href="path with spaces/file with spaces.htm">
 
I want to read the block of text and replace spaces with %20 so links won't
break. I know, I know, links shouldn't have spaces in them, but this is
something I inherited and changing all the links and filenames associated
with them is not an option (there are thousands of links/files).
 
I've tried this: <cfset content=REReplaceNoCase(content, '<a href="(.*)">',
'<a href="#URLEncodedFormat(\1)#">', "all")>
 
and this: <cfset content=REReplaceNoCase(content, '<a href="(.*)">', '<a
href="#Replace(\1, " ", "%20"))#">', "all")>
 
and those don't work. Can I not use CFML functions on a regexp subexpression
(\1) ?
 
I'm not exactly an expert on regexps, so any help would be greatly
appreciated.
 

 

Mike Wallick




Web Application Developer




[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 




651.628.5377




http://www.securecomputing.com <http://www.securecomputing.com/> 

 

 

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to