Re: Pb'lm of Regular Expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ankur_os@xxxxxxxxxxxx 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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux