Works fine for me. The part of your regex that actually excludes the newline(s) is the ^ and $ anchors, not the .*?. But what you have works fine. $X correctly winds up being 0 or 1.
In reply to Re: newline behavior in Regular Expression
by Anonymous Monk
in thread newline behavior in Regular Expression
by asinghvi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |