Saturday, December 1, 2018

html - regular expression to remove links

Regex is generally a bad solution for HTML parsing, a topic which gets discussed every time a question like this is asked. For example, the element could wrap onto another line, either as


  href="[variable content]">X

or


X


What are you trying to achieve?


Using JQuery you could disable the links with:


$("a.development").onclick = function() { return false; }

or


$("a.development").attr("href", "#");

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...