php - regular expression: Find url from anchor tag -
I have a problem I want to find the url form acnchor tag containing the "title" tag in the anchor tag.
Example: & lt; A href = "http://www.test.com" title = "Xyz" & gt; This test is & lt; / A & gt;
How can I match the string and get the url using regular expressions.
Thanks
& lt; A \ s + ([^ & gt;] *) href = "(https :: \ / \ / ([^" * *)) "\ s + ([^ & gt;] *) Title =" xyz " (. *?) & Gt; (. *?) & Lt; / a & gt;
You can partial match $ 2
, you can try it
Comments
Post a Comment