I have a Unicode string consisting of letters, digits and punctuation marks. Ho can I detect characters that are digits and letters (not necessarily ASCII) with a C++ standard library or Win32 API?
+2
A:
This Microsoft documentation page describes "Unicode character classes" in regular expressions, which sounds highly relevant. I think the answer is in the .Net domain, and not pure Win32 C++, but perhaps you can dig something up.
unwind
2009-05-29 11:16:32
Link leads to Regex syntax reference.
n0rd
2009-05-29 12:30:53
+4
A:
I recommend the ICU library. It has all that Unicode data, as well as a decent Unicode string class for C++.
Dietrich Epp
2009-05-29 11:55:04
+9
A:
iswdigit(), iswalpha() and iswalnum() are the functions you are looking for.
Cheers !
Magnus Skog
2009-05-29 13:07:28