1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

regular expession

Discussion in 'PHP' started by ssimon171078, May 26, 2018.

  1. #1
    how to write regular expression to extract title and img:
    <a href="https://www.ebay.com/itm/Adjustable-Four-Sided-Folding-Measuring-Tool-Multi-Angle-Template-Scale-Ruler-AA/332632430263?hash=item4d727016b7:m:m1vy9zAjKvfdqmdZ9Chf6WA"  class="img imgWr2">
              <img  onerror='ABOVEFOLD.load(1);' onload='ABOVEFOLD.load(0);'
                 src="https://i.ebayimg.com/thumbs/images/m/m1vy9zAjKvfdqmdZ9Chf6WA/s-l225.jpg" class="img" alt='Item image' />
             </a>
           </div></div>
       <h3 class="lvtitle"><a href="https://www.ebay.com/itm/Adjustable-Four-Sided-Folding-Measuring-Tool-Multi-Angle-Template-Scale-Ruler-AA/332632430263?hash=item4d727016b7:m:m1vy9zAjKvfdqmdZ9Chf6WA"  class="vip" title="Click this link to access Adjustable Four-Sided Folding Measuring Tool Multi Angle Template Scale Ruler AA">Adjustable Four-Sided Folding Measuring Tool Multi Angle Template Scale Ruler AA</a>
         </h3>
       <div class="lvsubtitle" >
         Brand New</div>
    HTML:

    SEMrush
     
    Last edited by a moderator: May 26, 2018
    ssimon171078, May 26, 2018 IP
    SEMrush
  2. sarahk

    sarahk iTamer Staff

    Messages:
    25,479
    Likes Received:
    3,538
    Best Answers:
    103
    Trophy Points:
    665
    #2
    I'd use phpdom rather than ereg
     
    sarahk, May 26, 2018 IP
  3. phpmillion

    phpmillion Member

    Messages:
    145
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    45
    #3
    phpmillion, May 27, 2018 IP