I am trying to put a regex match in PHP to find whether the string contains any other invalid characters other than the following characters,
~!@#$%^&*()_-+=\}]{[::'"/>.<,
alpha, space, numeric
I want to print the string if it contains any other character other than the previously mentioned characters
ßab? - Invalid
Ba,- - Valid
I tried using preg_match
with few inputs but unable to complete it.
Any help would be appreciated.