I want to detect punctuation (!@#$%^&*()?<>”‘;:}{][) wherever in a string (front or behind the string)…
$string = "'Hello!'";
$anotherstring = "Hi";
I want it to record the punctuation in $string and echo it with $anotherstring…
Hello
‘Hi!’
Actually I am making a spell checker and the problem is that it checks the string with the punctuation.. I want to check it without the punctuation and echo the before punctuation before the suggestions and the after punctuation after the suggestions…
This maybe a dirty trick 🙂
EDIT: You can remove the digits if you don’t need them