preg_replace ("/(\p{P})/", ' ', $str) removes apostrophes, and it should not. Please help
Try this:
/\p{P}(?<!')/
The additional look-behind assertion is to ensure that the punctuation character is not an apostrophe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With