I'm not sure there's any built-ins for checking if a string contains only numeric characters or only alphabetic characters. You could use toInt()
or toFloat()
with the fallback option to do it, like in this post:
but I think this is one case where a script transform would be worth it.
Python has some nice built-ins like isalpha()
(a-z only), isalnum()
(a-z + digits allowed but no special characters), and isnumeric()
(only digits allowed). For anything more complicated you'd have to do regex like Transistor said.
Please correct me if I'm missing anything.