我想找到并替换嵌套在父标记内的一些子标记。 这是我的模板:
<$tag$ $attribute$=$value$>
<$childTag$ $childAttr$=$childValue$ />
<$tag$/>
我通过正则表达式将文本过滤应用于$value$
和$childValue$
:
$value$
过滤器为.*sm-landing-appstore-app-1-gallery--main.*
$childValue$
过滤器为sm-landing-appstore-app-1-gallery__slide-img
这是HTML文档的一部分,我想在其中找到我的sm-landing-appstore-app-1-gallery__slide-img
并将其替换:
<div class="sm-landing-appstore-app-1-gallery__main-gallery">
<div class="sm-landing-appstore-app-1-gallery__main-gallery-frame-wr swiper-container">
<div class="sm-landing-appstore-app-1-gallery__frame sm-landing-appstore-app-1-gallery__main-gallery-frame swiper-wrapper">
<div class="sm-landing-appstore-app-1-gallery__slide sm-landing-appstore-app-1-gallery__main-gallery-slide sm-landing-appstore-app-1-gallery__main-gallery-slide--screenshot swiper-slide"
data-index="0" data-id="0">
<div id="cmp-6" class="sm-ratio sm-landing-appstore-app-1-gallery__slide-in">
<div class="sm-ratio__placeholder"></div>
<div class="sm-ratio__body">
<div class="sm-landing-appstore-app-1-gallery__slide-cv"><img
class="sm-landing-appstore-app-1-gallery__slide-img"
src="img/Fitness%20Buddy/1.jpg" alt="EasyFitness gallery 1" data-number-image="1">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
但是我的搜索模板的语法不正确。
使用IntelliJ结构搜索是否甚至可以找到嵌套标签?