How to preg_match regex values between dynamic urls in php

33 views Asked by At

I want to preg_match the values between these html tags with php but the url is dynamic in these html elements it is change every time

<a class='feedlink' target='_blank' href='https://www.hostname.com/itm/1385154?hash=itm24460266c2:g:GRsAAOSwoc9lCywT'>This is Value-1</a></h4><table border="0" cellpadding="8">

<a class='feedlink' target='_blank' href='https://www.hostname.com/itm/1456754?hash=itm44644556c6:g:yty5yh6jk76rt564'>This is Value-2</a></h4><table border="0" cellpadding="8">

<a class='feedlink' target='_blank' href='https://www.hostname.com/itm/1753454?hash=itm53556545h2:g:gdj89900lldsd46h'>This is Value-3</a></h4><table border="0" cellpadding="8">

Continue....!

Note: above html content is stored in a php variable for example like $myfeed

I want to preg_match these values from above html elements, values are also change every time

This is Value-1

This is Value-2

This is Value-3

0

There are 0 answers