If you notice inpattern 1 & 2 inside <MAP>tag only <COMMENT> is there but in pattern 3 there is lots of other steps are there. I need to find all xml where its either match pattern 1 or 2.
I have tried with below syntex but its not working
which uses the PCRE library, and is found, AFAIK, only by default on some Linux distributions. What EXACT version of UNIX/Linux do you have? What shell?
You might want to use sed instead. Once you find STANDALONE, you can append the next line and look at it. This is an example of what your sed control file should look like:
/STANDALONE/ {
N
/with mapping/ {
...insert your code here ...
}
}