I'm sure this can be accomplished with a regular expression but I'm looking for an easy way to find a whole word. For xample, if I have these types in a file:
Listener ClickListener
And I do a find on "Listener", I'll hit both of these, although more often than not, I want to match only the "whole" word, so just match the first Listener.
I think this is easy to do by adding word boundaries around your search (whitespace, ., [, (, {, etc), but I'm wondering if this functionality is built in as an option that I'm missing.
Thanks- Robert
On Wed, Mar 11, 2009 at 2:31 PM, Robert J. Carr rjcarr@gmail.com wrote:
I'm sure this can be accomplished with a regular expression but I'm looking for an easy way to find a whole word.
It sure can be accomplished with a regular expression. And it's easy.
Just surround your word with the 'word boundary' token: \b
For xample, if I have these types in a file:
Listener ClickListener
Tick the regular expression box and search for '\bListener\b'
On Wed, Mar 11, 2009 at 1:52 PM, Matt Bauman mbauman.lists@gmail.com wrote:
On Wed, Mar 11, 2009 at 2:31 PM, Robert J. Carr rjcarr@gmail.com wrote:
I'm sure this can be accomplished with a regular expression but I'm looking for an easy way to find a whole word.
It sure can be accomplished with a regular expression. And it's easy.
Just surround your word with the 'word boundary' token: \b
For xample, if I have these types in a file:
Listener ClickListener
Tick the regular expression box and search for '\bListener\b'
Does seem like this should be something fairly simple to build-in though... Feature request!
Cheers, Chris