I have wikimedia tags in a text file. I need to get rid of these tags from starting to ending even when nesting. I'm using Perl.
I'm facing a difficulty in nested tags. I'll give two examples of these tags that I could not to remove.
Example 1:
{{ text
text
text {{ text
text}}
text }}
Example 2: instead of "{{" in example 1, we have the tags "]]".
[[ text
text [[ text
text]]
text ]]
The nesting can be to unlimited levels.
I hope someone to pinpoint me to solve this issue