Some delimiters chars wont work under windows.
Ex. in preg_match:
"°[a-z]?°"
works on linux but on windows you get a warning:
Warning: Unknown modifier '?' in ........ on line xx
"/[a-z]?/"
works on both systems
So my question is: Are there similar problems in other functions or circumstances where such chars pose a problem under windows?
Thanks,
Regex delimiter problem
Moderator: General Moderators
strange,works fine for me on w2k/php4.3.2
what version do you use?
sure there isn't any other cause?
Code: Select all
<?php
$pattern = "°[a-z]?°";
$source = 'ab';
preg_match($pattern, $source, $matches);
print_r($matches);
?>what version do you use?
sure there isn't any other cause?