テキスト内の最後のスペースを見つける正規表現を探していますが、HTML タグ内のスペースを見つけたくありません。
"This is a string with <strong>some</strong> html in it"
正規表現が見つけるべきスペースは、 と の間のスペースinですit。その正規表現はそれほど難しくありません。ここでも同じ正規表現が機能します。
"This is a string with <strong>some</strong> html in <a href="">the end</a>"
スペースは HTML の と の間にtheなりますend(OK!)
しかし、私の文字列が次の場合:
"This is a string with <strong>some</strong> html in the <a href="">end</a>"
次に、スペースは と の間theで<aはなくと の間にある必要が<aありhref="">end<a>ます。
誰かアイデアはありますか?