How do I replace the iOS apostrophe ’ with php using preg_replace ?
I tried
preg_replace("/(\u2019)/", '-', $mytring); //Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u
preg_replace("/(’)/", '-', $mytring); //Not working
Based on answer, I tried
preg_replace("/(\x{2019})/u", '-', 'it’s'); //it’s
But I'm on Windows, does it matter?
Edit: OK it works now, I had to html_entity_decode it first and I couldn't see it from the dump. Thanks to people who answered.