Regex to avoid specific special characters
Need a regular expression that should avoid a specific string or all string which are having below mentioned symbols
Special character to avoid:
- Colon (:)
- Double forward slash (//)
- Dot (.)
- Question Mark (?)
- Ampersand (&)
- Equal To (=)
- Single forward slash (/)
Note:
- Only symbols used in the URL pattern should be validated/avoided.
- Other than that all other symbols are accepted
- Regex should be working in javascript specifically