Mainly I want to search for all lines that contain XXX and YY开发者_开发知识库Y on the same line in Eclipse.
What would be the correct search expression for that?
This regex should comply with your request:
(XXX.*YYY|YYY.*XXX)
Used under File Search, checking Regular expression.
Use XXX*YYY in file search option. This will mean that any characters can come in between XXX and YYY.
精彩评论