Why does this happen?
Because \s match all whitespace chars, including \n; thus \s{2} matches " \n" in your second line.
Based on the data you've provided, s[(\s{2})(?=\d)][2]g should do what you want.
In reply to Re: Perl regex. Why does this happen?
by BrowserUk
in thread Perl regex. Why does this happen?
by $h4X4_|=73}{
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |