Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

393.Regular expression replace -- How to change text file format with user specified rules?

User: wenbo -- 2010-01-15          << 392  394 >>
Hits: 2628
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
How I can exchange the special pattern characters to the most following another special pattern ?
Input Sample:
"A/G" 
CGGCAGAGAA CAGGTYASCC ACCACTATGC  

CAGGTTCTCA TCATTGAAGC TGCTCTCAGG  
"C/G" 
TATGGGCCCG CGTGGCGCGA GCAGAGGCGC 
TTCTCCGT 

TCCACCTTGC GCAACTTGGG CCTGGGCAAG  
AAGTCGCTGG 
 
Output Sample:
CGGCAGAGAA CAGGTYASCC ACCACTATGC  
[A/G] 
CAGGTTCTCA TCATTGAAGC TGCTCTCAGG 
TATGGGCCCG CGTGGCGCGA GCAGAGGCGC 
TTCTCCGT 
[C/G] 
TCCACCTTGC GCAACTTGGG CCTGGGCAAG  
AAGTCGCTGG 
 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume you want to change following format: 
 
"X/Y" 
************************ 
**************** 

 
with following format: 
************************ 
**************** 
[X/Y] 
 
Procedures: 
1. ctrl-o open source text file 
2. ctrl-h open 'replace' dialog 
* in "search for pattern", enter: 
 
* in "replace with pattern", enter: 
 
3. Click 'Replace', done 
4. Ctrl-s save to file
Download Script:  scripts/393.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to convert the text format by user specified rules? (86%)
How to refine multiple text files by specified rules? (68%)
How to change each line of data to the specified format? (67%)
How to convert a text file to specified format? (67%)
How to parse data from the text file and create text with  user specified format? (67%)
How to change each line into specified format? (63%)
How to split a large text file into specified various number of lines? (62%)
How to change text file with hexidecimal format into original binary file? (62%)

Check Demo of Regular expression replace
Keywords:
exchange  special  user  rules  characters  regular expression  ass  expression  rule  sum  special characters  characters special  exchange replace  specified format  replace another  another file  text replace rules  replace characters