1

I would like to search in my eclipse project all files where the expression "BLABLA" isn't in those files.

Examples:

File1 : text + blabla
File2 : text without blabla
File3 : text without blabla
File4 : text + blabla

I would like to return File 2 and 3.

Thx a lot

justhalf
  • 8,960
  • 3
  • 47
  • 74
stix
  • 110
  • 10
  • What does `^(?s)(?!.*blabla)` return you? (Or `\A(?s)(?!.*blabla)`). And i assume `blabla` doesn't contain any regex special character? – Robin Apr 07 '14 at 09:05
  • Thx for your response. But it return me nothing. Blabla is just a basic word without any spaces – stix Apr 07 '14 at 09:18
  • @Robin, Please post that as an answer and expand a bit to resolve this question. Thank you. – sshashank124 Apr 07 '14 at 09:22
  • @sshashank124: I would have if it were working but I'm not actually sure negative look ahead are supported in eclipse, hence the comment answer. Maxxy: you are using eclipse default search, right? – Robin Apr 07 '14 at 09:26

1 Answers1

0

You can use group negation for this. Use (?s)\A(?!.*?blabla).?. Refer this answer for more details. Check point no 4 in the question.

Community
  • 1
  • 1
Chandrayya G K
  • 8,719
  • 5
  • 40
  • 68