I have a problem that I have not seen before. The same regular expression produces two different results on two different servers.
This is the code:
preg_replace('#[^\ pL0-9_@- ]#iu', '', '!%&abc123_æøå');
Result on server A (php 5.2.6, Server Api: Apache 2.0 Handler):
abc123_æøå
Result on server B (php 5.2.5, Server Api: CGI / FastCGI):
123_
Anyone with ideas on why this difference is happening?
source share