Re: eregi_replace driving me nuts

From: Date: Wed, 10 Jul 2002 03:40:33 +0000
Subject: Re: eregi_replace driving me nuts
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-106658@lists.php.net to get a copy of this message
Patrick Teague wrote:
For some reason the following line is not behaving $os = eregi_replace( "Win[^dows]", "Windows ", $os );
I'm pretty sure (I'm not a regular expression expert) this matches "a string that begins with Win followed by a character that is not d, o, w, or s. Thus, in the case of Win98, it replaces "Win9" with "Windows " and leaves the 8 alone. Happy hacking. Chris

« previous php.general (#106658) next »