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 269294

Summary: Advanced regular expression replace in project do nothing
Product: ide Reporter: romlig
Component: UIAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal CC: romlig
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:

Description romlig 2016-12-10 16:00:55 UTC
When trying to use the Replace in Project with a complex regular expression, matches are found but when clicking on Replace # items, nothing is done (except the message # matches replaced is shown).

A complex regex is for exemple a(?=b) which use a positive lookahead to find all "a"s directly followed by "b".

How to reproduce:
1. Create a file containing "ab".
2. Select the file in the project view and use the shortcut for replace, usually Ctrl+H
3. Set the following options and click Continue
- Containing Text: a(?=b)
- Match: Regular Expression
- Replace with: aa
- Scope: Selection
4. In the search results, press "Replace one match"

Result: File still contains ab
Expected: File contains aab