Re: Everything between something becomes an array element

From: Date: Mon, 05 Nov 2001 13:57:45 +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-73481@lists.php.net to get a copy of this message
It gives me an error....: Warning: Compilation failed: nothing to repeat at offset 7 in c:\www\innocenti\teste.php on line 17 I think that 'offset' is like a letter from the regex, but I could not fix it... -- Julio Nobrega A hora está chegando: http://toca.sourceforge.net "Andrey Hristov" <andy@icygen.com> wrote in message news:php.general-73478@news.php.net... > > $how=preg_match_all('|\<tr>.(*?)</tr\>|',$the_big_string,$matches,PREG_SET_O RDER); > for ($counter=0;$counter<$how;$counter++){ > $big_array[]=$matches[$counter][1]; file://0 is the whole matched string, 1 is > // the first substring and so on > } > > var_dump($big_array); > > Regards, > > Andrey Hristov > Web Developer > Icygen Corporation > BUILDING SOLUTIONS > http://www.icygen.com > > On Monday 05 November 2001 08:32 am, you wrote: > > Hi All, > > > > I am playing with Regex this morning and could not find a solution. I > > have a string (fread from a page) where several times <tr>'s and > > </tr>'s > > appear. > > > > What I am trying to accomplish is to put everything between <tr> and > > </tr> in a 'place' where I can search for keywords later. > > > > I thought about making the middle content an array element but I don't > > understand much of Regex. > > > > Anyone can help me? > > > > Thanks a lot. > > --

« previous php.general (#73481) next »