Hello, I need to strip some span tags with a particular attribute, but leave the enclosed text intact.
For example:
<span class="someClass">Here's my text</span>
Replace with:
Here's my text
Thanks for any help you can offer.
Hello, I need to strip some span tags with a particular attribute, but leave the enclosed text intact.
For example:
<span class="someClass">Here's my text</span>
Replace with:
Here's my text
Thanks for any help you can offer.
Comments
Comment #1
mtndan commentedOk I did managed to create a regex search and replace that seems to work:
Search:
<span class="recentChange">(.*)</span>Replace:
\1However the replace operation keeps timing out and I see this error in the logs:
Also, the replace action just deletes content out of the body field instead of replacing the match. Please help. Thanks!
Comment #2
aasarava commentedYour search term itself needs to be "regex safe". Try escaping your closing span tag like so: <\/span> .
Comment #3
LarsKramer commentedBe aware also that only the "greedy" quantifiers work with this module. Try something like this: http://drupal.org/node/534538#comment-1867648
Comment #5
Rhino commentedThat's spam above isn't it?EDITED BY SILVERWING - spam removedI have a search for images, where I want to remove all of them. I can search like this and get results;
http:\/\/domain.com\/images\*
but I don't get results if I include the
<img src="before the url, no matter how I escape it (or don't escape it).Never mind, I can find things if i search
<img src="http:\/\/etc - doing something else wrong as it's the end.jpg">which confuses things.What I want to do: it's is the entire "img src" path I need to find and replace (not just the filepath to the image). I want to remove some images from nodes. (path is the same, image-name is different, and I'm sure all of you are familiar with the html
<img src="blabla.jpg">which needs to be removed with it.Comment #6
damienmckennaI am sorry, but we're not supporting the D6 version of the module anymore.