Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1254.Regular expression replace -- How to exchange positions of strings before and after underscore?

User: Marvin -- 2014-09-28          << 1253  1255 >>
Hits: 1564
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
I am having problems of changing the positions of two tokens at each end of _. 
For example, how could I change "December_NNP" into "NNP_December". 
I ll put some sample text down. Many thanks if you could show me how to use this software to switch the  
positions
Input Sample:
December_NNP 17_CD ,_, 2011_CD Apple_NNP  
iOS_NNP News_NNP iPad_NNP in_IN the_DT  
Classroom_NNP Transforms_VBZ the_DT  
Learning_NNP Process_NNP The_NNP iTablet_NNP  
materializes_VBZ the_DT vision_NN of_IN using_VBG  
PCs_NNS in_IN schools_NNS and_CC  
classrooms_NNS ,_, an_DT expectation_NN  
that_WDT was_VBD first_RB set_VBN for_IN  
laptops_NNS ._. 
The_DT utilization_NN of_IN iPad_NNP in_IN  
schools_NNS is_VBZ said_VBN to_TO be_VB  
transforming_VBG the_DT learning_VBG process_NN  
of_IN
Output Sample:
NNP_December 
CD_17 
,_, 
CD_2011 
NNP_Apple 
NNP_iOS 
NNP_News 
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file 
2. ctrl-h open 'replace' dialogue 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
3. click 'replace', done. 
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Similar Examples:
How to batch rename files by replacing all spaces with underscore? (53%)
How to generate 100 random words with number, lower case letter and underscore? (52%)
How to change each pair of single quote to parenthesis? (51%)
How to change the location of all numbers randomly? (50%)
How to rename all the files by adding the file size after filename? (50%)
How to remove everything after specified strings in text files? (49%)
How to batch rename files by repositioning numbers? (48%)
How to batch rename files by removing everything after last "."? (48%)

Check Demo of Regular expression replace
Keywords:
switch  software  underscore  exchange  avi  position  before and after  strings  dec  two  replace underscore  exchange replace  this after  replace strings  two text  text before  ctrl h replace example  replace text after