choroba is right (++). For something as complex as an <svg> element and its subtree, using regex will just be a rabbit hole. There are plenty of proper parsers around, so choose one of those instead. But do have a read of the literature, eg: Parsing HTML The Cthulhu Way for an appreciation of doing things properly and of when you don't have to.
In reply to Re: Regular expression question
by hippo
in thread Regular expression question
by prenaud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |