Re: how to change old ereg? [message #181939 is a reply to message #181937] |
Wed, 26 June 2013 11:29 |
astrid.kuhr
Messages: 5 Registered: June 2013
Karma:
|
Junior Member |
|
|
Hello!
Sorry, it was a misstyping.
The original was:
} elseif (ereg('^M?(([0-9]?)[ ]?([0-9])(/?)([0-9]*))SM$',
$temp_visibility_miles . ' ' . $part, $regs)) {
and I changed to
} elseif (preg_match('/^M?(([0-9]?)[ ]?([0-9])(/?)([0-9]*))SM$/',
$temp_visibility_miles . ' ' . $part, $regs)) {
But then:
Warning: preg_match() [function.preg-match]: Unknown modifier '?' in /var/www/html/phpweather/phpweather.php on line 329
And very very many other error-messages to.
How can I change it to get it work?
Regards, Astrid
|
|
|