Regex to match 2 things in 1 HTML file
Posted
by
CyberK
on Stack Overflow
See other posts from Stack Overflow
or by CyberK
Published on 2010-12-25T09:15:35Z
Indexed on
2010/12/25
13:54 UTC
Read the original article
Hit count: 415
Hi,
I have a HTML file which contains the following:
<img src="MATCH1" bla="blabla">
<something:else bla="blabla" bla="bla"><something:else2 something="something">
<something image="MATCH2" bla="abc">
Now I need a regex to match both MATCH1 and MATCH2
Also the HTML contains multiple parts like this, so it can be in the HTML 1, 2, 3 of x times..
When I say:
<img\s*src="(.*?)".*?<something\s*image="(.*?)"
It doesn't match it. What am I missing here?
Thanks in advance!
© Stack Overflow or respective owner