This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 124226 - Improve applicability of "Whole Words" option
Summary: Improve applicability of "Whole Words" option
Alias: None
Product: editor
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2007-12-18 20:51 UTC by matthies
Modified: 2016-07-19 20:48 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description matthies 2007-12-18 20:51:36 UTC
Currently, the "Whole Words" option means "only consider matches that start with the start of some word and end with 
the end of some word". For example, searching for "foo == null" does work with "Whole Words". What doesn't work is 
having non-word characters at the beginning or the end of the match. Matching such characters is often useful to 
restrict the results/replacements to certain syntactical contexts, for example searching for "count)" to match "count" 
at the end of an argument list. Here "Whole Words" cannot be used to prevent "account)" from being matched, because 
the ")" prevents that anything at all is matched with "Whole Words". Thus one has to search for something like (regular 
expression) "([(, ])count\)" and for example replace with "$1replacement)", which is getting considerably more 
complicated than if "Whole Words" would be applicable here.

Ideally, the "Whole Words" option would simply mean "don't match partial words". Or in other words: "words are either 
fully containted in a match, or not at all".
Comment 1 Martin Balin 2016-07-07 07:31:30 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 2 matthies 2016-07-18 20:01:26 UTC
Still relevant in current dev build.