Here is an example of a custom tag that I have from sitemap.xml
<url> <loc>http://sitename.com/programming/php/?C=D;O=A</loc> <changefreq>weekly</changefreq> <priority>0.64</priority> </url>
There are many such entries, and if you see the loc tag, it has c = d; 0 = a at the end. I want to delete all entries, starting with <url> ending with </url> , which contains C = D; 0 = A or similar patterns like this.
The following expression matches all of the above tag
<url>(.|\r\n)*?<\/url>
but I want to match what I indicated in the description above.
How to form a regular expression to match such conditions (patterns)?
Jayapal chandran
source share