Sorry to ask such a basic question but I cannot find the answer. I want to match a string that only allows a-z0-9. The alphas and digits prescence are optional but not other characters should be there. The string should be compatible with the regex implemented by Ziath.
Asked
Active
Viewed 119 times
0
-
Please post your own attempts so we can help – Lance Toth Mar 22 '18 at 11:54
-
I tried ^[a-z0-9]*, [a-z0-9], ^[a-z0-9]+$, [a-z0-9] then I tried searching on the web and got ^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$ , ^[a-z][-a-z0-9\._]*$ and (?<=function\s*)[a-zA-Z0-9]+(?=\s*\() though I think the last one is some kind of .NET special thing. My test strings are eeeeeeeee333e eeeeeeeee333. 1111111111111 62222222252242 123456789012q abcd1234 a1 1a 1 A 1 a a££££$$$ a – Neil Benn Mar 22 '18 at 12:11
-
I see you tried `^[a-z0-9]+$` that was my guess as well – Lance Toth Mar 22 '18 at 13:14