I’m trying to check if a string contains certain characters. I was going to use regex, but my string may not have a format.
I would like to ensure that i’m allowing only the following characters
1. + symbol 2. - symbol 3. numbers 0~9 4. ( 5. ) 6. . (dot) 7. spaces
This regex will match a string containing only those characters:
Working Demo