0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ダブルクオーテーションで閉じ忘れてあるHTML属性を正規表現で一括で閉じ直す備忘録

Posted at

結論

  • 検索文字列:(\w+)=([^" >]+)
    • ※「*」を押下して正規表現検索を有効にしておく
  • 置換文字列:$1="$2"

解説

  • $1,$2は正規表現でヒットした文字列
  • $1はそのままで、$2のみダブルクオーテーションで括って"$2"
  • なおVSCODEだと上記だが\1のように表記するエディタもあるので注意
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?