matches problem: refinement of the question

From: Date: Wed, 14 Nov 2001 21:56:02 +0000
Subject: matches problem: refinement of the question
Groups: php.general 
Request: Send a blank email to php-general+get-74645@lists.php.net to get a copy of this message
Von: "Bruno Grab" <bgrab@bluewin.ch> An: <php-general@lists.php.net> Betreff: Re: [PHP] matches problem ("preg_match") Datum: Mittwoch, 14. November 2001 12:41 Thank you for your answer. However our real problem is to solve it with preg_match. we want to rather analyse more complicated structures than the one in our example. Well, let me reformulate it: How can we (with preg_match) s a v e each subpattern into an array element, that is, also e a c h m a t c h o f a r e p e a t e d s u b - p a t t e r n (e.g "(...)*" and "(...)+") ?? Thanks a lot (again) Bruno "Valentin V. Petruchek" <petruchek@zsu.zp.ua> schrieb im Newsbeitrag news:028f01c16c5b$c87b1da0$6e64010a@weblab.zsu.zp.ua... > Try this code: > > $str="eins zwei drei vier fünf sechs"; > $Wort = explode (' ',$str); > > $n=count($Wort); > for($i=0;$i<$n;$i++){echo "$i: $Wort[$i]<br>";} > > It should works > > Zliy Pes val@zliypes.com.ua > > > >

« previous php.general (#74645) next »