Detecting words that start with an accented uppercase using regular expressions
问题 I want to extract the words that begin with a capital — including accented capitals — using regular expressions in Java. This is my conditional for words beginning with capital A through Z: if (link.text().matches("^[A-Z].+") == true) But I also want words that begin with an accented uppercase character, too. Do you have any ideas? 回答1: Start with http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html \p{javaUpperCase} Equivalent to java.lang.Character.isUpperCase() 回答2: To