Re: minimal matching in reg.expr.

From: Date: Thu, 22 Jul 1999 12:35:44 +0000
Subject: Re: minimal matching in reg.expr.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-8962@lists.php.net to get a copy of this message
Again, PHP's preg functions are what you need. You need to upgrade though, these functions were new as of 3.0.9. - Stig On Thu, 22 Jul 1999, Michael Schueller wrote: > Hi, > > how can I match minimally in reg.exp.? (like in Perl by e.g. ".*?" ) > > in Perl I would do the following: > > $a = "abcabc"; > $a =~ s/a.*?c/d/; > > (--> $a == "dabc") > > in PHP this doesn't work (Warning: REG_BADRPT in ...). > > Regards, > Michael > > (PHP 3.0.7, LINUX RedHat 5.1, Kernel 2.0.34) > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#8962) next »