Re: preg_match

From: Date: Wed, 28 Aug 2002 07:58:10 +0000
Subject: Re: preg_match
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114335@lists.php.net to get a copy of this message
hi, yes, you have to escape the '.' because it has a special meaning, it matches on Any character (except newline maybe). But you probably do not need a preg_match anyway. Merijn van den Kroonenberg e-factory bv Tel.: +31 (0)475 - 340 975 Fax: +31 (0)475 - 320 351 Web: www.e-factory.nl ----- Original Message ----- From: <richard.mail@softhome.net> To: <php-general@lists.php.net> Sent: Wednesday, August 28, 2002 9:39 AM Subject: [PHP] preg_match > hi all, > > i'm trying to create an script that cut's the text when a "." ( dot ) is > found in one of the last words.. > > i'm trying it with preg_match but it seems not to work. > > this is what i'm trying : > > if($i==15) { > if(preg_match("/./",$text2[15])) { > $text3 .= "($i $text2[15] )"; > break; > } > } > > could some one tell me what i'm doing wrong? > > thnx > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#114335) next »