You've just demonstrated my first point. My second point explained why the regexp wouldn't work even in the absense of the behaviour.
Less abstractly, I was tring to explain that matching the beginning of the string (^ when not under /m) is useless under </code>/g</code>. It's the same as if /g wasn't there. I rephrased my post to this effect.
In reply to Re^3: substitute leading whitespace
by ikegami
in thread substitute leading whitespace
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |