Good catch re. the s modifier, I missed that. Thanks for the correction.
With regard to your second point, from the way the OP initialised $code I don't think always ending with a newline was the requirement s/he was addressing. For the more general case you are correct.
Cheers,
JohnGG
In reply to Re^3: Recursive Regex
by johngg
in thread Parsing using Regex and Lookahead
by deMize
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |