I\'m looking for a regular expression to isolate the src value of an img. (I know that this is not the best way to do this but this is what I have to do in this case)
Here is the one I use:
(?:(?!\1).)*)\1|(?[^\s>]+))[^>]*?>
The good part is that it matches any of the below:
And it can also match some unexpected scenarios like extra attributes, e.g: