Re: Pb'lm of Regular Expression

From: Date: Mon, 08 Nov 2004 08:41:35 +0000
Subject: Re: Pb'lm of Regular Expression
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201501@lists.php.net to get a copy of this message
ankur_os@opensols.com wrote:
"<img src=\"https://abc.com/first.php? site_id=abc&aid=keyin&lid=keyin&ref=&q=\" width=\"1\" height=\"1\">";
/<img\s+.*?src="(.*?)".*?>/s The complete tag is in index 0, the src is in index 1 of the match-array.
Now what regular expression i write so i can fetch the image tag from my site of above syntex.And if possible send me the regular expression of fetching <A href=""</A>
/<a\s+href="(.*?)".*?>(.*?)<\/a>/s The complete tag is in index 0, the href attrib in index 1 and the link text in index 2.

« previous php.general (#201501) next »