/]+)>((?:.(?!\<\/a\>))*.)<\/a>/g
This one will match any ...
tag including correctly matching ones that contain a < or any full tags such as:
blah blah This line contains an HTML opening < bracket. blah blah
blah blah This line contains bold text. blah blah
キャプチャする:
This line contains an HTML opening < bracket.
- with capture groups:
href="test.html"
This line contains an HTML opening < bracket.
そして
This line contains bold text.
- with capture groups:
href="test.html"
This line contains bold text.
It also includes capturing groups for the tag attributes (like class="", href="", etc) そして contain (what is between the tag) that can be removed if you do not need them.
複数の行にまたがってキャプチャする場合は、最後に "g"フラグの前後に "s"を追加します。 "s"フラグは、正規表現のすべてのフレーバで機能しないことに注意してください。
Capture example (not using the "s" flag - not supported by regexr yet): http://regexr.com/39rsv