in reply to Re^2: Something strange in the world or Regexes
in thread Something strange in the world or Regexes
It's the UTF-8 encoding (0xC2 0xA0) of the non-breaking space (which is not included in the "whitespace" set of chars1 — thus your regex didn't match).
___
1 update: at least not the iso-latin-1 encoding of the character, i.e. 0xA0 (for backwards compatibility, Perl assumes iso-latin-1 by default):
print "\xa0" =~ /\s/ ? "space" : "no space"; # no space
But see below. Apparently, the 0xc2 part ("Â") somehow got lost in your case... — simply (incorrectly) treating the UTF-8 sequence as iso-latin-1 should have left you with two characters.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Something strange in the world or Regexes
by JavaFan (Canon) on Sep 30, 2009 at 11:38 UTC | |
by ikegami (Patriarch) on Sep 30, 2009 at 18:48 UTC | |
by jakobi (Pilgrim) on Sep 30, 2009 at 11:47 UTC | |
by JavaFan (Canon) on Sep 30, 2009 at 14:08 UTC |