Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

How should I modify the following such that the accented letter É is matched and the expression returns True?

StringMatchQ["Éta", RegularExpression["[a-zA-Z]+"]]
share|improve this question
Somewhat related: How to remove accents from text? – Mr.Wizard Jan 16 at 8:46

1 Answer

up vote 10 down vote accepted

One possibility:

StringMatchQ["Éta", RegularExpression["[[:alpha:]]+"]]
share|improve this answer
On the Documentation page for RegularExpression I see only listing of named classes of characters: alnum, alpha, ascii, blank, cntrl, digit, graph, lower, print, punct, space, upper, word, xdigit. Some of them have self-explanatory names like ascii, digit etc. but some (like alpha) have not obvious meanings. Where can I learn about them? – Alexey Popkov Jan 16 at 10:36
3  
@AlexeyPopkov here, in the section, "POSIX character classes". – Oleksandr R. Jan 16 at 10:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.