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.
.txtNotepad2 で正規表現を使用して、すべての行を削除したいと思います。例:
.txt
という単語を含まないすべての行を削除しますEngineer。
Engineer
Erik, 35, CEO John, 24, Engineer Stan, 22, Sales Bill, 21, Operations Katie, 31, Sales
この問題の簡単な解決策はありますか?
次の正規表現を使用して、これらの行を照合できます。
^(?!.*?Engineer).*$
次に、空の文字列に置き換えます""。
""
何も置き換え^(?!.*Engineer).*$ないでください - トリックを行う必要があります!
^(?!.*Engineer).*$