Friday, 6 September 2013

how can i use regular expression to grab img tag?

how can i use regular expression to grab img tag?

I want to grab img tag from text returned from json data like that
i want to grab this from a string
<img class="img"
src="https://fbcdn-photos-c-a.akamaihd.net/hphotos-ak-frc3/1239478_598075296936250_1910331324_s.jpg"
alt="" />
what the reqular expression i must use to match it
I used this code but it is not working
"<img[^>]+src\\s*=\\s*['\"]([^'\"]+)['\"][^>]*>"

No comments:

Post a Comment