Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

400.Advanced search and replace -- How to convert the text format by user specified rules?

User: editor -- 2010-01-19          << 399  401 >>
Hits: 3620
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to convert the text format by user specified rules?
Input Sample:
ACCURATE-> ACCURATELY|ACCURACY|ACCURATE 
ADD-> ADDDITIONAL|ADDITIONAL|ADDITIONS|ADDITION|ADDING|ADDED|ADDS|ADD 
ADVERTISE-> advertisements|ADVERTISEMENT|advertisments|ADVERTISING|ADVERTISED|ADVERTISES|ADVERTISE|ADVERT|ADS|AD 
AFFORD-> AFFORDABILITY|AFFORDABILIT|AFFORDABLE|AFFORDING|AFFORDED|AFFORD
Output Sample:
ignore_case=1,reg_exp=1,cross_line=1,binary_file=0 
 
<find>\b(ACCURATELY|ACCURACY|ACCURATE)\b</find> 
<replace>ACCURATE</replace> 
<find>\b(ADDDITIONAL|ADDITIONAL|ADDITIONS|ADDITION|ADDING|ADDED|ADDS|ADD)\b</find> 
<replace>ADD</replace> 
<find>\b(advertisements|ADVERTISEMENT|advertisments|ADVERTISING|ADVERTISED|ADVERTISES|ADVERTISE|ADVERT|ADS|AD)\b</find> 
<replace>ADVERTISE</replace> 
<find>\b(AFFORDABILITY|AFFORDABILIT|AFFORDABLE|AFFORDING|AFFORDED|AFFORD)\b</find> 
<replace>AFFORD</replace>
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' dialog: 
* set "Replace Scope" to 'Line' 
* in search for pattern, enter: 
 
* in replace with pattern enter: 
 
* click "Advanced" page, put following in "insert begin text" entry: 
 
3. click "Replace", done! 
4. ctrl-s save the file.
Download Script:  scripts/400.rst.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to change text file format with user specified rules? (86%)
How to convert a text file to specified format? (74%)
How to convert the text from hex format to ascii format? (69%)
How to convert numbers into scientific format with specified spacing? (67%)
How to refine multiple text files by specified rules? (66%)
How to sort the text by the number of specific word in each line? (65%)
How to convert text with pig latin rules? (65%)
How to parse data from the text file and create text with  user specified format? (64%)

Check Demo of Advanced search and replace
Keywords:
user  binary  bina  ignore  rules  find  insert begin text  insert begin  bin  case  specified format  format convert  text replace rules  insert text in the begin  search and replace convert  insert text begin  convert text file search replace  convert text