开发者

Eclipse search for perfect match (regex)?

开发者 https://www.devze.com 2023-03-26 06:11 出处:网络
In eclipse its possible to do a file search Ctrl+H. I need to do this but it must only return a perfect match like \'com.company.base\' and not all strings that have this as a prefix, eg.

In eclipse its possible to do a file search Ctrl+H. I need to do this but it must only return a perfect match like 'com.company.base' and not all strings that have this as a prefix, eg.

com.company.base.model com.company.base.db com.company.base.ui etc.

I have tried to enable the regex option but am n开发者_运维技巧ot sure how to formulate that it should be a perfect match. Any ideas?


Try that:

\scom\.company\.base\s

You need to escape the . - otherwise it means any character. \s means white space.


What about searching for com.company.base where the next character is not a dot?

com.company.base[^.]
0

精彩评论

暂无评论...
验证码 换一张
取 消