I’ve just been modifying a Lua pattern to try to get it to match " " but not “\n”. Unfortunately the %s character class matches both, and I wanted something more elegant than sticking a space in the pattern itself.
My current solution has been the rather inelegant [^%c%d%a] pattern (i.e. not a control character and not a digit and not a letter).
Anyone know of any better solutions? The test case is:
[lua]
assert((" “):find(pattern)~=(”\n"):find(pattern))
[/lua]