var rawString = '<a>This is sample</a><img src="example1.com" /></br><img src="example2.com" /><p>String ends.</p>'
var output = somefunction(rawString);
output should be:
output = ["example1.com","example2.com"];
I didn't find any solution here. I tried using few regex but couldn't work perfactly.
Here are stackoverflow few answers:
https://stackoverflow.com/a/12393724/4203409
https://stackoverflow.com/a/25632187/4203409
Thanks in advance.
String ends.
';` – Joaquinglezsantos May 16 '16 at 07:22