Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

886.Text sort -- How to sort file by the number which first appear in each line?

User: ssim -- 2011-11-11          << 885  887 >>
Hits: 2163
Type: Text sort   
Search all Text sort examples
Description:
sort file by the number which first appear in each line.
Input Sample:
N10->N1
N9->N2
N11->N100
N3->N76
Output Sample:
N3->N76
N9->N2
N10->N1
N11->N100
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 with pattern' to:

3. click 'replace',done.

Note: 
* you must use Replace Pioneer version 2.68 or newer.
* replace(shift,"^[^\d+]","") means remove the leading non-digit characters, in this case, all leading 'N' will be removed.

Screenshot 1:  Replace_Window


Similar Examples:
How to sort the text by the number of specific word in each line? (69%)
How to count the number of specified part in each line? (68%)
How to batch split file delimitered by first dash in each line? (65%)
How to sort a text file by the length of text in each line? (65%)
How to sort all the numbers in each line randomly? (64%)
How to count number of words appeared in a text file? (62%)
How to count the number of words for many files and append result to each file? (61%)
How to sort the text file by the date at the beginning of each line? (61%)

Check Demo of Text sort
Keywords:
leading  non  digit  dig  use replace pioneer  text sort  case  version  rsi  characters  remove first characters  sort first  remove first number  remove number in each line  remove number each line  remove the first line  remove first line  remove first line file