Here's what I observe: There may or may not be a line break between the elements. However, your regex assumes that there is not. Somehow, you need to get the entire document into one variable, and run the substitutions on that variable, making sure you account for possible newlines in the variable.
-Bryan
In reply to Re: Swapping XML Elements
by mrborisguy
in thread Swapping XML Elements
by peace
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |