Sublime Text3で正規表現で置換 (~と~に挟まれた要素を置換)

こんなHTMLがあった場合

<div class="info">
<img class="shop-qr-code" src="../wp-content/themes/bistro/images/sample-img3124.jpg" alt="びすとろ" width="125" height="125" />
</a>
</div>
.
.
.
<div class="info">
<img class="shop-qr-code" src="../wp-content/themes/bistro/images/sample-img02.jpg" alt="知恵熱" width="125" height="125" />
</a>
</div>
.
.
.
<div class="info">
<img class="shop-qr-code" src="../wp-content/themes/bistro/images/sample-img06.jpg" alt="友達がほしい" width="125" height="125" />
</a>
</div>

これで全て検索できる

<div class="info">
<a href="(.*)" target="_blank">
<img class="shop-qr-code" src="(.*)" alt="(.*)" width="125" height="125" />
</a>
</div>

こうしたい場合は???

<div class="shop-list-block">
<div class="shop_name"><a href="(.*)" target="_blank">(.*)</a></div>
<div class="shop_info">

<div class="shop_text">
<ul>
	<li class="shop-address">(.*)</li>
	<li class="shop-tel">(.*)</li>
</ul>
</div>
</div>
</div>

<div class="shop-list-block">
<div class="shop_name"><a href="(.*)" target="_blank">(.*)</a></div>
<div class="shop-address">(.*)</div>
<div class="shop-tel">(.*)</div>
<div class="shop-blog-link"></div>
</div>

コメントを残す