It's there to match the closing of the src attribute (see the `\1` at the end of the regex). I think the `\1` could be replaced with just `["\']`.