I want to create a Java regular expression to grab all words that start with a capital letter then capital or small letters, but those letters may contain accents.
Examples :
Where
Àdónde
Rápido
Àste
Can you please help me with that ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Regex:
Java string:
Explanation:
Caveat: This only works correctly in very recent Java versions (JDK7); for others you may need to substitute a longer sub-regex for
\b. As you can see here, you may need to use (kudos to @tchrist)for
\b, so the Java string would look like this: