Is it possible to write a regular expression that matches all strings that does not only contain numbers? If we have these strings:
If we want to restrict valid characters so that string can be made from a limited set of characters, try this:
(?!^\d+$)^[a-zA-Z0-9_-]{3,}$
or
(?!^\d+$)^[\w-]{3,}$
/\w+/: Matches any letter, number or underscore. any word character