I have this HTML string that looks like this:
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
</head>
<body style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; direction: rtl; text-align: rtl; word-wrap: break-word">abcdefghijklmnopqrstuvwxyz
<img src="/Users/user/Library/Application Support/iPhone Simulator/7.0.3-64/Applications/7D48D94E-2FE5-4F66-AE29-B7E2EB30870B/MyApp.app/image003.png">
<img src="/Users/user/Library/Application Support/iPhone Simulator/7.0.3-64/Applications/7D48D94E-2FE5-4F66-AE29-B7E2EB30870B/MyApp.app/image003.png">
<img src="/Users/user/Library/Application Support/iPhone Simulator/7.0.3-64/Applications/7D48D94E-2FE5-4F66-AE29-B7E2EB30870B/MyApp.app/image003.png">
<img src="/Users/user/Library/Application Support/iPhone Simulator/7.0.3-64/Applications/7D48D94E-2FE5-4F66-AE29-B7E2EB30870B/MyApp.app/image003.png">
</body>
</html>
I'm building this string in the code by button click's and present it on a UIWebView. My problem is that I want to remove the last image from this string, but I don't know how. I think that the best way is to use Regular expression, but I don't know how to use it. Also I don't really know if it's possible, because I don't know what will be the last string, it could be just a char or it could be an image.
Someone have any idea?
Thanks in advance!