If you want to match anything other than letters, you should study the Unicode properties .
\p{L} - any letter from any language
Using the uppercase βPβ instead is a negation, so \p{L} matches everything that is not a letter.
\d or \p{Nd} matches digits
So your expression in a modern Unicode style will look like this:
Or using a negative character class
[^\p{L}\p{Nd}]
or negative properties
[\P{L}\P{Nd}]
Next, matches() matches an expression against a complete string, so your expression is true with only one char character per line. Therefore, you need to add a quantifier:
string.matches("[^\p{L}\p{Nd}]+")
returns true when the full string has only non-alphabetic characters and at least one of them.
stema
source share