Re: Everything between something becomes an array element
| From: | Julio Nobrega Trabalhando | Date: | Tue, 06 Nov 2001 12:19:47 +0000 |
| Subject: | Re: Everything between something becomes an array element | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73578@lists.php.net to get a copy of this message | ||
Ladies and Gentleman,
I still can't do it. I've tried a lot of ways. The $matches or $big_array
always come empty, no matter what I did.
Here are a few examples of what I have tried:
$how=preg_match_all('~\<tr\>(.*)<\/tr\>~',$var,$matches,PREG_SET_ORDER);
$how=preg_match_all('/~\<tr\>(.*)<\/tr\>~/',$var,$matches,PREG_SET_ORDER);
$how=preg_match_all('/|\<tr\>(.*)<\/tr\>|/',$var,$matches,PREG_SET_ORDER);
$how=preg_match_all('|\<tr\>(.*)</tr\>|',$var,$matches,PREG_SET_ORDER);
$how=preg_match_all('<tr\>(.*)</tr\>',$var,$matches,PREG_SET_ORDER);
A few more with '?' next to '*', and a few more variations. One of my
tries returned a gigantic array of thirteen thousand (yes, thousand!)
Arrays! But all empty, not a single character inside.
I am lost on Regex. I read a couple tutorials here and there but not much
ideas came. Also the variations above with preg_match() and preg_split()
were tried.
Anyone can give me another hand, please?
--
Julio Nobrega
A hora está chegando:
http://toca.sourceforge.net