sorin
sorin

Reputation: 170628

How do I search for two strings on the same line in Eclipse?

Mainly I want to search for all lines that contain XXX and YYY on the same line in Eclipse.

What would be the correct search expression for that?

Upvotes: 4

Views: 3981

Answers (2)

Luca Geretti
Luca Geretti

Reputation: 10286

This regex should comply with your request:

(XXX.*YYY|YYY.*XXX)

Used under File Search, checking Regular expression.

Upvotes: 7

Naveen Babu
Naveen Babu

Reputation: 1584

Use XXX*YYY in file search option. This will mean that any characters can come in between XXX and YYY.

Upvotes: 0

Related Questions