28
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

空行を削除する置換(正規表現)

空行を削除

前
<p>hogehoge</p>
   ←これ{空行}
<p>hogehoge</p>
↓
後
<p>hogehoge</p>
<p>hogehoge</p>

正規表現での置換

改行コードによって変わるので注意

■検索文字列
LF(Mac/Linux)の場合:
^\n
CRLF(Windows)の場合:
^\r\n
■置換文字列
(何もなし)

スクリーンショット 2016-03-31 15.01.20.png

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
28
Help us understand the problem. What are the problem?