Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

497.Regular expression replace -- How to batch replace text that contains special characters like $,{,} ?

User: lio -- 2010-05-03          << 496  498 >>
Hits: 2966
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
replace like this below!~ batch replace!~
Input Sample:
select * from {$pre}members where 
Output Sample:
select * from my_members where 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Three typical ways to use 'Replace Pioneer' to replace some special characters.

1. you just need to add a backslash before the character, like 
 

2. you can also quote the strings with backquote(`) that contains special characters like:

Note: this approach is not supported in 'Fast Replace' operation.

3. If your search and replace strings are all fixed strings, you can also uncheck 'Regular Expression' option to 'Replace' window, in that case, you do not need unescape all special chars

Let's use the 2nd approach as example:
1. ctrl-o open source text file
2. ctrl-h open replace window
* in 'serch for pattern' enter:

* in 'replace with pattern' enter:

3. click 'Replace', done!

Screenshot 1:  Replace_Window


Similar Examples:
How to batch replace lines that has less than 10 characters? (66%)
How to replace line that contains no space? (62%)
How to replace text containing some special symbols in a text file? (61%)
How to search and replace text for specified occurrences with reg exp? (58%)
How to search and replace text 'ReplaceMe' only in specified lines? (57%)
How to batch replace files with specified format in each line? (56%)
How to batch rename files by changing specified part separated by dash? (55%)
How to change a paragraph of text to a specical shape like a triangle? (55%)

Check Demo of Regular expression replace
Keywords:
escape  serch  text that contains special characters  cap  special characters  special character  quote  quot  special  2nd  serch replace  batch contains special characters  batch serch replace text  replace special character batch  batch contains character  batch special character  batch text special characters  batch special characters