in reply to Re: regexp: removing extra whitespace
in thread regexp: removing extra whitespace
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: regexp: removing extra whitespace
by ikegami (Patriarch) on Nov 04, 2011 at 20:57 UTC | |
by Eliya (Vicar) on Nov 04, 2011 at 21:28 UTC | |
by ikegami (Patriarch) on Nov 05, 2011 at 01:11 UTC | |
by perlmax (Initiate) on Nov 04, 2011 at 21:37 UTC | |
by GrandFather (Saint) on Nov 04, 2011 at 21:41 UTC | |
by ikegami (Patriarch) on Nov 05, 2011 at 01:23 UTC | |
by perlmax (Initiate) on Nov 04, 2011 at 23:24 UTC |