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 - Advanced regular expression replace in project do nothing
Summary: Advanced regular expression replace in project do nothing
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: UI (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-10 16:00 UTC by romlig
Modified: 2016-12-10 16:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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