How do you match one letter in the current locale?

Q

How do you match one letter in the current locale?

✍: Guest

A

/[^\W_\d]/
We don't have full POSIX regexps, so you can't get at the isalpha() <ctype.h> macro save indirectly. You ask for one byte which is neither a non-alphanumunder, nor an under, nor a numeric. That leaves just the alphas, which is what you want.

2013-09-23, 2192👍, 0💬