I can\'t find the regex for strings containing only whitespaces or integers.
The string is an input from user on keyboard. It can contain everything but \\n (bu
You need to put start (^) and end of line ($) characters in. Otherwise, the part of the string with the characters in will match, resulting in false positive matches