OK.  It's implied, but I'm assuming you want these to stop being links, am I
right?  If so, you need to do something more like the following:

foo = REReplaceNoCase(foo,'<a class=jargon
href="javascript:popUpJargonDefinition\([0-9]*\)">([^<]*)</a>',"\1", "all");

Note that I've removed the ^.* and the .*$ because these will cause the
regex to match all of foo if it contains a matching link.  I've also escaped
the parens in the javascript call, so they are seen as parens in the text
instead of a grouping operator.  I also added "all" to the replacenocase
call, so it will replace all instances.

Should you require more assistance, feel free to go to the regex list either
online via the archives or by subscribing:
http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21
For all your regex needs.  Ninjas are standing by.


--  Ben Doom
    Programmer & General Lackey
    Moonbow Software, Inc

: -----Original Message-----
: From: Oliver Cookson [mailto:[EMAIL PROTECTED]
: Sent: Wednesday, July 02, 2003 8:41 AM
: To: CF-Talk
: Subject: OT: RegEx Question
:
:
: Hi,
:
: In a nutshell I need to find all instances of the below link (see below)
: in a article. The article could be 2 lines long or 2000 lines long and
: the again the there could be 2 links or 2000 links.
:
: This is an example of the link I need to look for and replace:
:
: <A class=jargon href="javascript:popUpJargonDefinition(136)">katie</A>
:
: NOTE: The ID (in this case "136") will change and the label (in this
: case "katie") will also change, everything else will be the same.
:
:
: This is how far I got but it doesn't work and im really scratching my
: head:
:
: <CFSET foo = REReplaceNoCase(foo,'^.*<A class=jargon
: href="javascript:popUpJargonDefinition([0-9]*)">([^<]*)</a>.*$',"\1")>
:
: (sorry for the word wrap)
:
: Any help would be greatly appreciated!
:
: Thanks
:
:
: 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to