RE: [PHP] Everything between something becomes an array element
| From: | Kevin L | Date: | Tue, 06 Nov 2001 12:27:51 +0000 |
| Subject: | RE: [PHP] Everything between something becomes an array element | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73581@lists.php.net to get a copy of this message | ||
Can't find the original code you are trying to parse in a previous message.
Do you have a sampe of the code you are trying to parse?
Kevin
-----Original Message-----
From: Julio Nobrega Trabalhando
[mailto:inerteARROBAhotmail.com@pb1.pair.com]
Sent: Tuesday, November 06, 2001 5:20 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Everything between something becomes an array element
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net