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.
TextSoap を使用して削除できるように、コードのブロックを選択する必要があります。
冒頭の "< !DOCTYPE" から最初の "< h1>" までをすべて選択するにはどうすればよいですか?
ありがとう。
一般的な正規表現は次のようになります'^<!DOCTYPE(.|\n)*?<h1>'が、コメント者が正しく言ったように、どの言語を使用していますか? 言語によって、正規表現を処理する方法が異なる場合があります。これを試すこともできます: http://regexpal.com/
'^<!DOCTYPE(.|\n)*?<h1>'