I'm trying to extract strings after a pattern in a long string, which is basically HTML output of a page.
For example; I need to extract target of href tag from this string
<h2 class=\ "product-name\"><a href=\"/erkek-ayakkabi-spor-gri-17sfd3007141340-p\" title=\"...">...</a></h2>\r\n
What I need from this: erkek-ayakkabi-spor-gri-17sfd3007141340-p
But also I need to find strings alike to the one above. SO I need to search for href
tags after class=\ "product-name\"
in the HTML string.
How can I achieve this?