AudiS2 Posted December 2, 2010 Share Posted December 2, 2010 I am using a regex with /iumsU modifiers. On some servers this crashes PHP and I need to turn UTF8 off thus the modifier becoming /imsU I am wondering how can I detect the requirements for /u to work normally so I can dynamically adjust my regex? Cheers Quote Link to comment Share on other sites More sharing options...
requinix Posted December 2, 2010 Share Posted December 2, 2010 "Crash" how? An actual crash? Or /u just isn't supported? Quote Link to comment Share on other sites More sharing options...
AudiS2 Posted December 2, 2010 Author Share Posted December 2, 2010 Crash as in the script terminates, I assume because of mode not supported. But I can not find anywhere what are the requirements for /u searches Quote Link to comment Share on other sites More sharing options...
AudiS2 Posted December 3, 2010 Author Share Posted December 3, 2010 If that helps I discovered that it is not that PHP crashes but just preg_replace, returning an empty string with /u. Still looking for ideas! Quote Link to comment Share on other sites More sharing options...
AudiS2 Posted December 5, 2010 Author Share Posted December 5, 2010 Last bump! Quote Link to comment Share on other sites More sharing options...
requinix Posted December 6, 2010 Share Posted December 6, 2010 preg_replace, returning an empty string with /u. ...So it's not a crash. Not even close to a crash. Your expression isn't matching. preg_replace would have complained if you tried to use an invalid flag: look for error messages (if you don't see anything, check your error_reporting and display_errors settings)> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.