0

Get first Image and clear the other, with regex

Hi, I was wondering can any body help me to get only first image result and remove the next value from html description.

example :

Reports: Nelson Mandela on life support Nelson Mandela endured 27 years in prison before becoming South Africa's first president from 1994 to 1999.Revolutionary and politician Nelson Mandela

how to get only this value :

Thanks for the help guys

by
2 Replies
  • example:

    Reports: Nelson Mandela on life support Nelson Mandela endured 27 years in prison before becoming South Africa's first president from 1994 to 1999.Revolutionary and politician Nelson Mandela

    The value I'm trying to get :

    thanks

    --Merah

    0
  • sorry, I heaving an issue when try to post the example, anyway here s code I'm trying to solve

    <img src='<http://i2.cdn.turner.com/cnn/dam/assets/130626040913-mandela-wall-heart-story-body.jpg>'>Reports: Nelson Mandela on life support <img src='<http://i2.cdn.turner.com/cnn/dam/assets/130625122348-mandela-carousel-use-only-horizontal-gallery.jpg>'>Nelson Mandela endured 27 years in prison before becoming South Africa's first president from 1994 to 1999.<img src='<http://i2.cdn.turner.com/cnn/dam/assets/130625122348-mandela-carousel-use-only-horizontal-gallery.jpg>'>Revolutionary and politician Nelson Mandela <img src='<http://i2.cdn.turner.com/cnn/dam/assets/130623193728-mandela-makaziwe-daughter-00003613-story-body.jpg>'>
    

    and the value I'm tying to get

    <img src='<http://i2.cdn.turner.com/cnn/dam/assets/130626040913-mandela-wall-heart-story-body.jpg>'>
    
    0

Recent Posts

in Pipes