Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1188.Advanced search and replace -- How to replace "ou" with "i", where "ou" has more than 2 comma before it?

User: colin -- 2014-03-28          << 1187  1189 >>
Hits: 1110
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
is there a way I can go through changing "ou" to "i" in strings, where "ou" has more than 2 groups of letters before it.
but leaving words where ou has either 1 or 2 letter groups before it.
What i am trying to do is change "ou" in long strings but leave it in shorter
Input Sample:
=================
g,l,a,m,or,ou,s,
sh,a,m,or,ou,s,l,y
g,r,ie,v,ou,s,n,e,ss,
ch,e,ai,k,i,ng,ou,s
=================
ar,ou,s,i,ng,
b,ou,s,er,
b,l,ou,s,e


Output Sample:
=================
g,l,a,m,or,i,s,
sh,a,m,or,i,s,l,y
g,r,ie,v,i,s,n,e,ss,
ch,e,ai,k,i,ng,i,s
=================
ar,ou,s,i,ng,
b,ou,s,er,
b,l,ou,s,e
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 'Chars'
* set 'replace with pattern' to 'Line'
* 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 extract all lines that has more than 2 numbers? (50%)
How to batch rename files in different folders and move them to a common folder? (50%)
How to remove/delete line breaks of all lines which has more than 20 characters? (49%)
How to batch replace lines that has less than 10 characters? (48%)
How to generate files from template file, where some variables come from a list? (47%)
How to extract all lines that has more than 4 columns from csv file? (47%)
How to replace the first 3 spaces into comma in each line of text? (47%)
How to extract column X from csv file where X is decided by column A? (46%)

Check Demo of Advanced search and replace
Keywords:
shorter  avi  short  groups  leave  what  more than  group  letters  strings  before letter  replace letters  change letter  replace strings  replace letter  text before  3 letter  more replace