regex all alphanumeric characters and spaces code example
Example 1: how to get only alphanumeric and whitespace in string regex
/[A-Za-z\d\s]/g
Example 2: regex allow alphanumeric and special characters
/^[ A-Za-z0-9_@./#&+-]*$/
/[A-Za-z\d\s]/g
/^[ A-Za-z0-9_@./#&+-]*$/