Why doesn't this regular expression work in PHP?
php, regex
Solution
How is your file encoded? PHP has got issues when it comes to unicode. In your case, try using the escape sequence `\x99` instead of directly embedding the TM symbol.
Problem
I need to match (case insensitive) "abcd" and an optional trademark symbol Regex: `/abcd(™)?/gi` See example: ``` preg_match("/abcd(™)?/gi","AbCd™ U9+",$matches); print_r($matches); ``` When I run this, `$matches` isn't populated with anything... Not even created as an empty array. Any ideas?