-2

I have a string as shown below

NSString *imagesource=@"<img src="http://edge.shop.com/edge.shop.com/ccimg.shop.com/250000/255300/255316/products/1142702303.jpg" title="Marley Coffee® Mystic Morning Organic Ground Coffee" alt="Marley Coffee®";        

How can I select only the text starting with 'src=' (and ends with a space), in this case the source of the image

Ayoub
  • 138
  • 1
  • 3
  • 8
  • Please always explain what you've tried yourself to fix it before asking others to do it for you. – EWit Nov 30 '14 at 14:09

1 Answers1

0

You can use a regular expression, check out this question which explains how to do it.

How to write regular expressions in Objective C (NSRegularExpression)?

Community
  • 1
  • 1
yairsz
  • 438
  • 5
  • 15