Programming Languages C# Subjective
Mar 14, 2013

How do you match one letter in the current locale?

Detailed Explanation

/[^\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.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback