I am trying to match every src attribute that ends with jpg or png or gif and extract src string inside. I am not sure if the following regex that I came up with is correct, but it does give me src attributes with addresses. My question has to do with the possible problem of the following regex and how I can extract only the src string.
/src\s*=\s*(["'][^"']+(jpg|png|gif)\b)/g;