我正在尝试使用正则表达式
<img __defa([^>]*)(.+?)my_macro_movingImage24Pro([^>]*)/>
用于以下字符串。
我需要检测3个包含“my\u macro\u movingImage24Pro”的图像字符串
理想情况下,我需要检索3个匹配项。但前2个匹配项重叠为1。
有人能帮忙吗?
<body><p><strong>asifalsfhlshlsdasd</strong></p><p></p><p>Business
aso;i;dfhd;sdafhsa;fhds;lfsaffas.</p><p></p><p><strong>Video
I: safhsdlkfsddd</strong></p><p>asfsadfsafafsaadff.</p><p></p><p><img __default_attr="sfdsdfss" my_macro_name="sdfsdsd" class="my_macro my_macro_movingImage24Pro" data-renderedposition="239_8
427_252" height="250" src="/dfsfds/sdfsd1619a91/images/sdfd/plugins/dfd/images/spacer.gif" width="425"/></p><p></p><p><strong>Video II: </strong><strong>sdfsadfsafs</strong><strong> (~ 3 min.)<br/></strong></p><p>dsfsdfsff.</p><p></p><p><img __default_attr="sfdsdfss" my_macro_name="sdfsdsd" class="my_macro my_macro_movingImage24Pro" data-renderedposition="575_8_427_252" height="250" src="/dfsfds/sdfsd1619a91/images/sdfd/plugins/dfd/images/spacer.gif" width="425"/></p><p></p><p><strong>Video III: </strong><strong>sdfasdfsadf</
strong><strong> (~ 3 min.)</strong></p><p>Are you a people manager? asfsdafsaf.</p><p></p><p><img __default_attr="sfdsdfss" my_macro_name="sdfsdsd" class="my_macro my_macro_movingImage24Pro" data-renderedposition="911_8_427_252" height="250" src="/dfsfds/sdfsd1619a91/images/sdfd/plugins/dfd/images/spacer.gif" width="425"/></p><p></p><p>These videos are also posted on the <a _dser_internal="true" href="/sdf/asfdgcs/sfd/operations/sdfs-management"><strong>asfdsd Intranet page</strong> </a>dgfafdgadgg.</p><p></p><p>sfasfasdfasfaf <a href="XXXX" target="_blank"><strong>XXX</strong></a> (non-emergency on
ly).</p></body>