I am trying to write a pattern for extracting the path for files found in img tags in HTML.
String string = \"
Your pattern should be (unescaped):
src\s*=\s*"(.+?)"
The important part is the added question mark that matches the group as few times as possible