.*? ドット スター クエスチョンマーク あるいは ドット アスタリスク クエスチョンマーク(はてな)とはなにか
.*?
ってなに?
?
は non-greedy、貪欲でない
最小限のマッチですませる。
つまり.*?
は、任意の文字を最小限でマッチする。
例
対象:
<a href="http://foobarexample.com"></a><a href="http://barquuxexample.com"></a>
Find What:<a href=".*?</a>
結果:
<a href="http://foobarexample.com"></a>
Find What:<a href=".*</a>
結果:
<a href="http://foobarexample.com"></a><a href="http://barquuxexample.com"></a>