View Single Post
Old 01-18-2015, 07:09 PM   #15
shotsky
Enthusiast
shotsky began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2012
Device: none
Quote:
Originally Posted by rolgiati View Post
Here is a snippet:

looks like <a class="pcalibre" href="http://books.google.com/books?id=98PYVYGFCIIC&amp;pg=PA54&amp;lpg=PA54&amp ;dq=dimethylcadmium&amp;source=bl&amp;ots=oK-NDQqout&amp;sig=wDDF0qwknz3G-twxMl_6B8Di5lk&amp;hl=en&amp;sa=X&amp;ei=IhSDUdyMD NW-4AO51oCYAw&amp;ved=0CDMQ6AEwATgU#v=onepage&amp;q=d imethylcadmium&amp;f=false">extremely tedious work</a>, which allows you

In this exemple I would like to be able to remove everything from <a class to false">, and </a>, without loosing extremely tedious work.
I realize this is long solved, but I do these things all the time, so even a late reply might help someone.
The regex would be to replace <a\x20[^\r\n<>]+http[^\r\n<>]+>([^\r\n<>]*)</a> with $1. The link would be removed, and the text, if any would be retained. Only possible problem is if the </a> is missing.
If further explanation is wanted by anyone, let me know.
John
shotsky is offline   Reply With Quote