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 154692 - Regex Placeholders ($1,$2...) do not work in 'Replace in projects'.
Summary: Regex Placeholders ($1,$2...) do not work in 'Replace in projects'.
Status: RESOLVED WORKSFORME
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All Windows ME/2000
: P3 blocker (vote)
Assignee: Victor Vasilyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-05 09:38 UTC by nb_johan
Modified: 2009-11-11 06:50 UTC (History)
0 users

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 nb_johan 2008-12-05 09:38:26 UTC
I go to: 
Edit->Find In projects, I mark the 'selection' in the radio buttons.

Original Text: <html:hidden property="workspaceId" value="<%=(String)request.getAttribute("workspaceId")%>"/>
Find: "(<%=[a-zA-Z\.\(\)"]{0,}"[a-zA-Z\.\(\)"]{0,}%>)"
Replace With: '$1'
Text Expected: <html:hidden property="workspaceId" value='<%=(String)request.getAttribute("workspaceId")%>'/>
Text Retuned (Bug): '$1'

The IDE replaces it with '$1', not with the text that it matched from the parentheses.
If I do the same on the same files by using the find and Replace through 'Ctrl-H' : it works fine.

Note: If I give '$0' instead of '$1' it works fine again. But it is not what I want, because it gives the whole sentence
that has been found.
Comment 1 nb_johan 2008-12-05 09:43:42 UTC
On the second line I mean: Edit->Replace In projects
Comment 2 Alexei Mokeev 2009-11-11 06:33:45 UTC
Need look closer on what's the reason of behavior difference.
Comment 3 Alexei Mokeev 2009-11-11 06:50:32 UTC
After deeper look I realized that all the difference was due to bad copypast :)

In 6.8 dev builds replace in projects works exactly as you expecting. Closing as WFM