Re: (another) regex difficulty

From: Date: Wed, 01 Oct 2003 17:14:55 +0000
Subject: Re: (another) regex difficulty
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164586@lists.php.net to get a copy of this message
From: <jonas_weber@gmx.ch> > it's pretty simple: i need a regex that matches any character in a > string except "\*" (* stands for any char that follows the "\"). > > example: "this is \ba test" > should match: this a is test > > isn't there a way to do this? Turn that around. What you need to do is remove \* from your string... $new_str = preg_replace('/\\./','',$old_str); Regular expressions are for "pattern matching"... not matching everything BUT a pattern. ---John Holmes...

« previous php.general (#164586) next »