Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1281.Regular expression replace -- How to make following multiple rules replacement?

User: editor -- 2015-02-22          << 1280  1282 >>
Hits: 1258
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
I'm searching for multiple replacements in one step. (multiline mode)

input_season_clothing_sample.txt
Season: winter, Temp: cold
Clothing: pullover

line1 regex: Season/winter to summer
line2 regex: Season/summer/set Temp: hot
line3 regex: Season/summer/set Clothing: T-shirt

output_season_clothing_sample.txt
Season: summer, Temp: hot
Clothing: T-shirt

Please give me ideas to solve this Problem.
I work with Replace Pioneer 2.72

Input Sample:
Season: winter, Temp: cold 
Clothing: pullover
Output Sample:
Season: summer, Temp: hot
Clothing: T-shirt
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open replace dialogue
* set 'search for pattern' to:

* set 'replace with pattern' to:

3. click 'replace'.
4. repeat step 2,3, but:
* set 'search for pattern' to:

* set 'replace with pattern' to:

5.repeat step 2,3, but:
* set 'search for pattern' to:

* set 'replace with pattern' to:

6. Done, you can save above steps into one script for future use.
7. For multiple files, you can open "Tools->Batch Runner" window, select multiple files, and click "Fast Replace" button, add above 3 rules, and click start.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Window


Screenshot 3:  Replace_Window


Similar Examples:
How to make multiple text replace at the same time? (68%)
How to remove the "." and following strings from multiple filenames? (62%)
How to join multiple script (rst) files from replace pioneer? (60%)
How to make base64 encoding on multiple files? (60%)
How to make multi-word replacement with a mapping list? (58%)
How to replace file content in multiple files with corresponding filename? (56%)
How to replace strings in multiple files based on the search/replace mapping file? (56%)
How to replace all "ID" in following xml file with increased ID? (56%)

Check Demo of Regular expression replace
Keywords:
regex  chin  give  replacement  mode  repeat  mer  multiple rules replace  multiple rules  script  regex replace add 1  regex replace  text replacement  multiple script  txt replace rules  can make multiple search and replace  repeat text  replace text multiple file rules