Can someone help me create this regex. I need it to check to see if the string is either entirely whitespace(empty) or if it only contains positive whole numbers. If anything el
This helped me. It matches empty string and any number you enter.
/^(|\d)+$/
Try here if you want: regex101.com