Solved

Regular Expressions in Visual Web Developer 2012

Posted on 2012-03-14
2
421 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!
0
Comment
Question by:Latitudes
2 Comments
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 37722511
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.
0
 

Author Closing Comment

by:Latitudes
ID: 37722611
Thanks for the quick reply! This works great!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question