We help IT Professionals succeed at work.

Regular Expressions in Visual Web Developer 2012

Latitudes
Latitudes asked
on
Medium Priority
464 Views
Last Modified: 2012-03-14
I have the following link that is one of 100 links on my web page.

<a onclick="window.open('http://www.link.com,'popup', 'width=800,height=600,resizable=yes,scrollbars=yes'); return false;" href="http://www.link.com">

I'd like to remove the onclick portion or (onclick="window.open('http://www.link.com,'popup', 'width=800,height=600,resizable=yes,scrollbars=yes'); return false;") for each link.  The problem is the link for each is different.  

Using regular expressions, how do I remove the portion above?  Thanks in advance!
Comment
Watch Question

Web Developer, specialising in WordPress
CERTIFIED EXPERT
Most Valuable Expert 2011
Commented:
I'm not entirely familiar with that tool, but this might work. Replace:
onclick="window[.]open[^"]*"
with an empty string.

 That will affect ALL tags, not just <a> tags though. If you need to target just <a> tags, let me know.

Author

Commented:
Thanks for the quick reply! This works great!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.