Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テキストに数字がないことは確かです. 簡単な作業を行うことができます:
text.matches(".*\\d.*")); // if return true, then text has digit
では、ユーザー入力の文字をどのように決定するのでしょうか?
ユーザーが入力した入力の文字を正規表現で判断する必要があります (他の関数よりも単純であるため)。