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

Summary: Improve applicability of "Whole Words" option
Product: editor Reporter: matthies <matthies>
Component: SearchAssignee: Milutin Kristofic <mkristofic>
Status: REOPENED ---    
Severity: blocker CC: markiewb
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

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.