Re: matches problem ("preg_match")
| From: | Bruno Grab | Date: | Wed, 14 Nov 2001 11:40:34 +0000 |
| Subject: | Re: matches problem ("preg_match") | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74578@lists.php.net to get a copy of this message | ||
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
>
>
>
>