I am trying to build a regex which filters alphanumerical strings. That means something like “12ab” or “ab12” or “a12b”. I must not match with single chars or numbers. My attempt was ‘[0-9a-zA-Z]+’. But this didn t work. For me it is a problem to say “the string starts with a character or a number …”
Here some examples.
to be recognized:
“aab2” “23ab” “a1” “a2acd”
not to be recognized:
“a” “aads” “1” “232323” “.” “+” “sas+”
Greetings,
Haniball
1 Answer