views:

1206

answers:

2

What's the syntax to perform a search/replace on Eclipse and use "match groups" ( is that it's name? "

On vi I:

%s/log(.*)/log \1 debug/g

And lines like:

log "Message"

are replaced with

log "Message" debug

What's the correct syntax for eclipse in the search/replace dialog box ( beside checking up "Regular expressions" )

Thanks.

+6  A: 
Peter Boughton
+1 for including screenshot.
seth
just saw the update...make that *screenshots.*
seth
Great!!! Thank you.. I miss vim :(
OscarRyz
Then you may be interested in Vrapper, an Eclipse plugin that wraps around editors and makes them Vim-like. http://vrapper.sourceforge.net/home/Doesn't do replacing, but still might be handy. :)
Peter Boughton
@Peter: I have tried vi plugins in some other tools but they only make things worst since then I don't know which tool am I. It interrupt my train of thought.
OscarRyz
A: 

In the Find Field: log(.*)

Int the Replace With Field: log$1 debug

AdamC