Forum Moderators: coopster
How can I strip out just the anchors that have this javascript in it while preserving the link text? I don't use javascript on any other parts of the page. One caveat is most of them are also broken over lines so they sometimes look like this...
<a
href="javascript:examplefunction('Ref')">link text</a>
I've been playing around with some reg ex but I just can't get it to work. Thanks for the help.
Tim
That gets me going in the right direction. I'm still having trouble getting the ones broken over lines. I've tried your suggestion plus <a[\r\n.]*href="javascript:.*">(.*)</a> but no luck. If I open it in the hex editor I can see the carriage return (x0D) and the line feed (x0A) and then a space. So what gives? Just one of those simple things to figure out but it seems like it's taking longer then if I just did it manually ;-)
Tim