正規表現は初めてです...
文字列にのみ一致する正規表現について問題があります。
0〜9、az、AZ、スペース、コンマ、および一重引用符?
上記の式に属さない文字が文字列に含まれている場合、その文字列は無効です。
それは次のようなものですか?
Pattern p = Pattern.compile("\\s[a-zA-Z0-9,']");
Matcher m = p.matcher("to be or not");
boolean b = m.lookingAt();
ありがとうございました!