Page 1 of 1

Regex delimiter problem

Posted: Sat Jun 21, 2003 10:45 am
by atu
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,

Posted: Sat Jun 21, 2003 11:16 am
by volka
strange,

Code: Select all

<?php
$pattern = "°[a-z]?°";
$source = 'ab';
preg_match($pattern, $source, $matches);
print_r($matches);
?>
works fine for me on w2k/php4.3.2
what version do you use?
sure there isn't any other cause?