正则表达式匹配的问题
字符串:<LOOP1 ChannelID=1111 Count=15 TitleLength=200>
<td><LOOP2 ChannelID=20390 Count=20 TitleLength=100>123456</Loop2></Loop1>
<LOOP1 ChannelID=2222 Count=16 TitleLength=300>
<td><LOOP2 ChannelID=20333 Count=20 TitleLength=100>654321</Loop2></Loop1>
其中有两个<LOOP1 ...></LOOP>,我想把两个都匹配出来,我现在用的正则式是:
(<loop1\s[^>]+>[\s\S]+</loop1>)
现在只匹配出一个来:
<LOOP1 ChannelID=1111 Count=15 TitleLength=200>
<td><LOOP2 ChannelID=20390 Count=20 TitleLength=100>123456</Loop2></Loop1>123
333<LOOP1 ChannelID=2222 Count=16 TitleLength=300>
<td><LOOP2 ChannelID=20333 Count=20 TitleLength=100>654321</Loop2></Loop1>
就是没有将两个LOOP1分出来,请问应该怎么处理?