This seems to be hunky-dorie but I’m sure that there a single line regular expression solution, don’t you?I've been here long enough to know that the proper answer to "What regex allows me to manipulate this markup language in the way I want?" is "Don't use regexes to manipulate markup; use dedicated parsers", and yet I see that far wiser monks than I have given different answers. On reflection, that's probably because your $value is like no HTML on earth. Where is this coming from? (It's irrelevant to the solution, but I'm curious.)
In reply to Re: Regular Expression Elegance
by JadeNB
in thread Regular Expression Elegance
by monkie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |