Re: question of REGEXP Pattern Modifiers

From: Date: Tue, 22 Oct 2002 15:18:56 +0000
Subject: Re: question of REGEXP Pattern Modifiers
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-120925@lists.php.net to get a copy of this message
Probably Inefficient but this should work: $str = "I\n am a\n boy"; if(substr_replace("\n","",$str) == "I am a boy") echo "matched"; Adam Voigt adam.voigt@cryptocomm.com On Tue, 2002-10-22 at 11:15, Ns_Andy wrote: > $str = "I\n am a\n boy"; > if(preg_match("/I am a boy/", $str)) > print("matched"); > > the thing I know is $str must be three or more lines, > How can I simply test a string even if there is a line feed > (matched will be printed in this case) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#120925) next »