I have XML in string like this:
<a:b>
<a:c></a:c>
<a:c></a:c>
</a:b>
and I would like to remove all data inside namespace 'a'.
Of course this can be done this way:
/<\ba\b:.*?>.*?<\/\ba\b:.*?>/
But in this case result is:
<a:c></a:c>
</a:b>
because the first closing tag for namespace 'a' is actually a child element. So doing it recursively would live '' inside my string.
So the idea I had was to use variable in pattern the same way as you can use it in replacement:
/<(\ba\b:.*?)>.*?<\/$1>/
This is a non working solution used just to represent the idea of realisation.
All your help, ideas, ... are very welcome. Thank you for your answer in advance.