Unicode has many different space characters . The space that you posted in your question - both in the header and in the body - is the usual ASCII space, the good old U + 0020.
If you want to verify exactly what you copied to your clipboard, you can run the pbpaste(1) command on Mac OS X. For example, if you copied inextricable space (U + 00A0), you can define it like this:
# Write pasteboard contents to stdout, convert from UTF-8 to UTF-32 for easy
Depending on the regular expression engine you use, it may not support all of them, especially if you use the \s character class. If you want to be sure of the space character, then specify it explicitly in your character class, for example. [\s<YOURSPACEHERE>] , where <YOURSPACEHERE> copied + pasted from the character you want to match.
source share