Re: eregi_replace driving me nuts

From: Date: Wed, 10 Jul 2002 03:56:43 +0000
Subject: Re: eregi_replace driving me nuts
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-106661@lists.php.net to get a copy of this message
In a weak attempt at improving my knowledge of regular expressions, I came up with a less elegant solution than Dan's. :-) $os=eregi_replace("Win([^0-9NT]*)", "Windows \1" $os); This adds some additional handy replacements, such as: Winblows98 -> Windows 98 Windoze98 -> Windows 98 It's a decent (well, so maybe not) example of using a replacement string, which I've always thought was neat. Happy hacking. Chris Analysis & Solutions wrote:
$os = eregi_replace('(Windows|Win)', 'Windows ', $os);


« previous php.general (#106661) next »