Good point; apologies if anyone reading this was confused. As you said, my intent was just to show two different methods, and putting them in the same macro for screenshot purposes was just the quickest way to accomplish that. When replacing actual text, you definitely do not need both actions; either one will suffice.
True, but as you yourself say in that thread:
and I'm inclined to agree, not only for accuracy reasons but also because \h
is so much easier to remember and type (not to mention much less intimidating to someone who isn't familiar with regex). Given those reasons, and the fact that macOS 10.11 is two years old at this point, I personally feel like \h
is safe to recommend as a general-purpose whitespace-targeting regex as a start, and to fall back on [^\S\r\n\f]
if it turns out the user is on 10.10 or older.
And hey, if nothing else, at least I'm no longer going around pushing \s
like all the other regex amateurs anymore, right?