Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search and replace - regex pattern in replace #332

Closed
GoogleCodeExporter opened this issue Aug 24, 2015 · 4 comments
Closed

Search and replace - regex pattern in replace #332

GoogleCodeExporter opened this issue Aug 24, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Using regex in search and replace I'd expect to be able to use group
references in replace pattern, but it does not work as I'd expect, or just
simply not documented, how should be used.

What steps will reproduce the problem?
1. Enter text "rizi-bizi"
2. Using regex option try to search "(zi)-(bi)" and replace it to \2-\1

What is the expected output? What do you see instead?
I'd expect "ribi-zizi" but I got "ri2-1zi"

What version of the product are you using? On what operating system?
1.9.9.7 on Windows XP SP 3


Please provide any additional information below.


Original issue reported on code.google.com by foldvar...@gmail.com on 27 Aug 2009 at 2:38

@GoogleCodeExporter
Copy link
Author

I am afraid this is currently not supported.  However, there is an Advanced 
Replace external Tool (Tools, Tools, Advanced Replace) that should do what you 
want.  You may want to look at the help file the topics on External Tools and 
Parameters to understand how it works and to customize it to your own needs.

Original comment by pyscripter on 12 Aug 2010 at 12:20

  • Changed state: Wont-do

@GoogleCodeExporter
Copy link
Author

Original comment by pyscripter on 8 Jun 2011 at 6:24

  • Changed state: Reopened

@GoogleCodeExporter
Copy link
Author

Fixed in version control.

Now substitution of subexpressions works both using the find Toolbar and in the 
Find-in-Files tool.

Use "$2-$1" in your example as the replace expression.

Original comment by pyscripter on 8 Jun 2011 at 6:25

@GoogleCodeExporter
Copy link
Author

Original comment by pyscripter on 11 Jun 2011 at 5:11

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant