Re: content search and grab

From: Date: Fri, 24 Nov 2000 23:18:24 +0000
Subject: Re: content search and grab
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27056@lists.php.net to get a copy of this message
Upps, only once and alway "networth:", sorry! Here: <? $str=" foo yxz:<Font size=2>$123,452 Networth:<font color=red>$1,258,125 foo "; if (eregi("networth:<font.*>([\$0-9,.]*)",$str,$erg)){ print "$erg[1]"; }else die("nothing found"); ?> only the value returns now.. :) Folke -- Folke Ashberg Stage Internet Services GmbH Technical Development folke@fanstage.de folke@fanstage.de | Tel: +49 89 454591-77 | Fax: +49 89 454591-71 Kreillerstr. 21 | 81673 Munich | Germany | www.fanstage.de On Sat, 25 Nov 2000, Folke Ashberg wrote: > > <? > $str=" > foo > yxz:<Font size=2>$123,452 > foo > Networth:<font color=red>$1,258,125 > foo > "; > preg_match_all("/(.*):<Font.*>(.*)/i",$str,$matchin); > for($i=0;$i<count($matchin[0]);$i++){ > print "{$matchin[1][$i]}={$matchin[2][$i]} <BR>\n"; > } > ?> > > for example. > this would output: > yxz=$123,452 > Networth=$1,258,125 > > regards > Folke > >

« previous php.general (#27056) next »