Help
How would I find and replace instances of the following:
<url>
<loc>http://www.eg.com/product/doll-pens%2C-set-of-5.do</loc>
<lastmod>2012-08-14</lastmod>
<priority>0.5</priority>
</url>
the above formatting is exactly how it is in my file with all white spaces exactly the same.
want instances of the above to be removed completely and not replaced with anything - just to clarify, this will be all url instances that contain '%'
Also lastmod and priority are the same values in all instances
many thanks in advance.
Regular expression Question
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Your whitespace was swallowed by the forum sofware. Next time you should use code tags:
Here's one way to do what you asked. First, enable POSIX regular expression syntax in Configure > Preferences > Editor. Then do a replace as follows:
Find what: _{4}<url>\n_{8}<loc>.*%.*</loc>\n_{8}<lastmod>2012-08-14</lastmod>\n_{8}<priority>0.5</priority>\n_{4}</url>\n (replace underscores with spaces)
Replace with: (nothing)
Code: Select all
<url>
<loc>http://www.eg.com/product/doll-pens%2C-set-of-5.do</loc>
<lastmod>2012-08-14</lastmod>
<priority>0.5</priority>
</url>
Find what: _{4}<url>\n_{8}<loc>.*%.*</loc>\n_{8}<lastmod>2012-08-14</lastmod>\n_{8}<priority>0.5</priority>\n_{4}</url>\n (replace underscores with spaces)
Replace with: (nothing)