In an if statement, I want to check if the string has punctuation in it. If it has punctuation, I want an alert message to pop up.
if((/*regex presumably*/.test(rspace))==true||(/*regex presumably*/.test(sspace))==true){
alert('Please enter your guessed answer in the fields provided, without punctuation marks.');
//if only punctuation are entered by the user, an alert message tells them to enter something.
}
Do I need a regex, or is there an automatic method to do this for me? Thanks in advance!