Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正規表現を使用して以下を取得するにはどうすればよいですか。タグ内の問題は、アルファベット、数字、およびメタ文字である可能性があります。
入力文字列:"<p>Hi </p><p>there</p>"
"<p>Hi </p><p>there</p>"
期待される出力:"Hi<p>there</p>.
"Hi<p>there</p>.
さらなる仕様が到着するまで、以下を使用してください。
<p>(.)*?</p>最初の (そして唯一の) グループ (.)*? を使用します。
<p>(.)*?</p>
これは一致<p> Hi </p>し、\1 を使用して ' Hi ' を参照します
<p> Hi </p>