0

i'm trying to find code in IntelliJ with regular expression search , to be able to have AND condition. i read this answer about the matter , but could not make it work i have this expression

^(?=.*platform) (?=.*SpringTestBase).*$ i have tried adding multiline /m at the end with no luck.

My Search string would be something like this

@MyAnnotation (profile=platform)
class SpringTestBase extends object {
 }
Shlomi Cohen
  • 195
  • 11

1 Answers1

1

You are better off using Structural Search and Replace functionality of IntelliJ, in Edit>Find>Search Structurally…:

@MyAnnotation(profile="platform")
class SpringTestBase {
}

This will automatically take care of whitespace normalization, different newline style, inheritance, etc. for you.

knittl
  • 246,190
  • 53
  • 318
  • 364