Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

211.Advanced search and replace -- Is it possible to remove/delete characters at specified location(such as 1,3,5) of each line?

User: editor -- 2008-07-03          << 210  212 >>
Hits: 2122
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
Is it possible to remove characters at specified location(such as 1,3,5) of each line?
Input Sample:
123456789
abcdefghijklmn
Output Sample:
246789
bdfghijklmn
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
It's very easy.
1. ctrl-o open source text file.
2. ctrl-h open 'Replace' dialog
* set 'Replace Scope' to 'Line'
* set 'Search for Pattern' to a single dot:

* set 'Unit Number filter' to:

* set nothing in 'Replace with pattern'
3. Click 'Replace', done!

Note:
1) '.' matches any character. 
2) 1,3,5 means the 1,3 and 5th matched character.
Other cases:
2..8 means 2,3,4,5,6,7,8(2 to 8)
2<2>8 means 2,4,6,8(2 to 8, step is 2)
2.. means 2,3,4,5,6,7,8, .....(2 to last)
2<2> means 2,4,6,8,10,...(2 to last, step is 2)
!2 means 1,3,4,5,6,7,...(not 2)
!2.. means 1(not 2,3,4...)
!2<2> means 1,3,5,7,9,11,...(not 2,4,6,8,...)
1,2,3,10<3> means 1,2,3,10,13,16,19,...
Download Script:  scripts/211.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove/delete specified lines such as 1,2,3 and 9,11,13,15,... in a text file? (61%)
How to replace the characters in fixed position in each line? (59%)
How to remove/delete the characters between 5 and 15 of every line? (58%)
How to remove everything after the second specified keywords in each line? (56%)
How to move some words from start of line to specified location in html file? (52%)
How to extract all characters within specified char set from a text file? (52%)
How to add a space at the specific location of each line? (52%)
How to remove/delete the text from the '#' to the end in each line? (52%)

Check Demo of Advanced search and replace
Keywords:
131  101  231  5th  dot  matches  delete characters  123  delete character  delete char  remove specified character  remove last line  remove last character  last character  remove specified  remove character text  text search replace with nothing  remove last