This regex will do the same thing but it will handle single quotes and no
quotes, and spaces between attribute name, =, and value.

rereplacenocase(text,"href\s*=\s*(""[^""]+""|'[^']+'|[^\s"'>]+)","href=""""","ALL")

On 10/19/05, Ben Doom <[EMAIL PROTECTED]> wrote:
>
> rereplacenocase(text, 'href="[^"]+"', 'href=""', "all");
>
> Replace the literal href call, the open quote, anything except a quote,
> and the close quote with the empty href attribute. Make sense?
>
> --Ben
>
> Tim Raster wrote:
> > I tried to read up on the RegEx stuff, but my little brain can't handle
> it.
> >
> > I have a big string of html text in a variable, and I want to replace
> all the HREF parameters within the A tags with empty strings. For example
> change all occurrences of:
> >
> > ........<a href="URL_Stuff_Here" class="blah">blah</a>...
> >
> > Into this:
> >
> > ........<a href="" class="blah">blah</a>...
> >
> > I basically just want to empty the HREFs. What RegEx expression can I
> use in a REReplace?
> >
> > TIA!
> >
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:21:930
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to