I am using the following regex to get the src
value of the first img
tag in an HTML document.
string match = "src=(?:"|')?(?<imgSrc>[^>]*[^/].(?:jpg|png))(?:"|')?"
Now it captures total src
attribute that I dont need. I just need the url inside the src
attribute. How to do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…