1
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?

More than 5 years have passed since last update.

new String()の文字列初期化を""(ダブルクォート)形式に置換する

Last updated at Posted at 2017-10-05

Javaソースをリファクタリングする際に、
new String()による文字列初期化から""(ダブルクォート)による文字列初期化に
置き換えるケースがよくある(ない)。
よくあるのだけれど、手打ちで消していくのはしんどかったりする。
この場合、正規表現を使って以下で置換すればおk.

置換前 new String\((.*)\);
置換後 $1;
1
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
1
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?