Shouldn't - in theory - [^\S \n] match the same set as your \s(?<![ \n]) (\S being complementary to \s)?
Just tried it with my perl (v5.12.2), and [^\S \n] doesn't match \x{0085} and \x{00A0}, while \s(?<![ \n]) does. Now I'm wondering why...
BTW, \v (\x{000B}) isn't matched in either case, here.
In reply to Re^2: regexp: removing extra whitespace
by Eliya
in thread regexp: removing extra whitespace
by perlmax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |