What's the syntax to perform a search/replace on Eclipse and use "match groups" (is that what it's called?)
On vi I do the following:
%s/log\(.*\)/log \1 debug/g
And lines like this one:
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.
Use $1 instead of \1
For the /g global replace flag, use the Replace All button:
(source: bpsite.net)
Note: The above is the Find/Replace dialog for a single file, comes up for Ctrl-F
For working across multiple files, default shortcut is Ctrl-H, and the dialogs are a bit different:
In the Find Field: log(.*)
Int the Replace With Field: log$1 debug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With