What is the match group syntax in Eclipse's search and replace
eclipse, regex, replace, vim
Solution
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:
Problem
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.