Answers for "escape all special characters except space in an input"

0

escape all special characters except space in an input

let charactertests = (val) => {
      const textPattern = /^([a-zA-Zs0-9]{1,254})(?![!@#$%^&*()_+-=[]{};':"\|,.<>/?])*$/g;
      const charactersInvalid = textPattern.test(val) || `invalid character`
      return charactersInvalid
    }
Posted by: Guest on February-02-2022

Code answers related to "escape all special characters except space in an input"

Browse Popular Code Answers by Language