Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding and replacing text in Intellij IDEA

What do I have:

More then 100 lines of fields with same structure:

var type1Name:String = "<some text>";
var type2Name:String = "<some text>";

<some text> is always different. name is always same.

What I want:

Delete all <some text> in all fields. This is more likely to "find and replace" operation, to find something like Name:String = "***"; and replace it with Name:String = ""; in all cases.

How can i do this with Intellij IDEA?

like image 537
SentineL Avatar asked Mar 04 '15 05:03

SentineL


1 Answers

if it is in one file : ctrl + r check the tick box Regex and look for Name:String = \"[^\"]*\" : this should match what you want.

Then replace it with whatever you want.

If it is in multiple file, use ctrl + shift + r

like image 178
benzonico Avatar answered Nov 16 '22 07:11

benzonico