Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 181168 - Suggestion for different semantics for regexp ^
Suggestion for different semantics for regexp ^
Status: RESOLVED DUPLICATE of bug 73615
Product: editor
Classification: Unclassified
Component: Search
PC Other
: P2 (vote)
: 7.0.1
Assigned To: Milutin Kristofic
Depends on:
  Show dependency treegraph
Reported: 2010-02-24 12:25 UTC by jsprenkle
Modified: 2011-07-08 14:31 UTC (History)
1 user (show)

See Also:

text being edited using RE (371 bytes, application/octet-stream)
2010-09-16 04:51 UTC, pbw
result of edit on text1 (400 bytes, application/octet-stream)
2010-09-16 04:53 UTC, pbw

Note You need to log in before you can comment on or make changes to this bug.
Description jsprenkle 2010-02-24 12:25:06 UTC
How to reproduce:

Open file.
Select multiple lines of text.
hit Ctrl-h to begin the search and replace operation
ensure regular expression check box is set
enter beginning of line character as pattern  ( "^" )
enter any text to be inserted at begging of each line.
Hit 'replace all' button.

Current behavior:

Nothing is found.

Expected behavior:

Entered text is inserted at the beginning of all selected lines.
Comment 1 Vitezslav Stejskal 2010-03-04 04:00:20 UTC
Umm, I'm not sure if regex can be used this way. Anyway, this is not a big deal.
Comment 2 pbw 2010-09-16 04:51:26 UTC
Created attachment 102039 [details]
text being edited using RE
Comment 3 pbw 2010-09-16 04:53:17 UTC
Created attachment 102040 [details]
result of edit on text1
Comment 4 pbw 2010-09-16 04:56:24 UTC
This IS a big deal, and REs ARE used in that way. Try it in vim; try it in perl.

But wait, there's more. Try find/replace using REs on the text in attachment text1. Use



You get the result in text2.
Comment 5 pbw 2010-09-16 11:48:31 UTC
Regular expression replace of '^' with some text, e.g. '#' works in JEdit as well.  I guess JEdit is using the Java regular expression handlers.
Comment 6 Milutin Kristofic 2011-07-08 14:31:26 UTC

*** This bug has been marked as a duplicate of bug 73615 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo