Is it possible to search for only a particular word under Eclipse IDE . For example i need to search for a word "sub" .
But the problem is that , when i did ctr l + H and typed the word "sub" , it producing all matching results such as submit ----etc , but i want the exact word "sub" in my Search .
Please let me know if its possible ??
Thanks in advance .
The Eclipse search dialog box allows you to search for files that contain a literal or a character pattern in the entire workspace, a set of projects, a specific project or folders selects in the package explorer view. Clicking on the Search menu and selecting Search or File or Java. Clicking Ctrl + H.
You can also use the Ctrl + H shortcut to search files in Eclipse project.
Use Ctrl + G to find all uses of a function in the project. Its Ctrl+Shift+G to search the function call in the entire workspace ctrl+G is only for the project. In general Ctrl+Shift+L gives all the commands.
Try using regular expressions in the File Search Dialogue (Ctrl + H). You can use the word boundaries
modifier \b
like so :
\bsub\b
asks eclipse to search for all matches in which sub is both followed and preceded by a word boundary. Read more about word boundaries here.
Here is a sample snapshot of the Search Results using the above:
If you want to restrict the search to the current project then try selecting 'Enclosing Projects' radio option. This option will be disabled if you don't already have a file from the Project opened. To get past this annoyance, I would recommend creating a Working Set with just the project(s) of interest and then restricting the search on that Working Set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With