Replace Pioneer Home
All Examples
Free Download
all
Advanced search and replace
Replace text in multiple files
Regular expression replace
Batch file rename
Batch download
Text file parser
Text file splitter
Html text generator
Search replace binary
Random word generator
Count and statistics
Character encoding
Bin Hex Oct Dec converter
Text generator
Text sort
Text merge
Text data calculation
RSS: Replace Pioneer Examples
332.Advanced search and replace -- How to add a line number at the beginning of each line?
User:
editor -- 2009-05-15
<< 331
333 >>
Hits:
3905
Type:
Advanced search and replace
Search all
Advanced search and replace
examples
Description:
How to add a line number at the beginning of each line?
Input Sample:
this is line1
this is line2
...
Output Sample:
1 this is line1
2 this is line2
...
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 Unit" to "Line"
* fill in "Replace with Pattern" like:
$line_no $match\n
3. click "Replace", done.
Download Script:
scripts/332.rst.zip
Screenshot 1: Replace_Window
Similar Examples:
Is there any way to strip/add the line number at the beginning of each line?
(79%)
How to add different words at the beginning of each line?
(76%)
How to delete all blank/space at the beginning of each line?
(71%)
How to sort the text file by the date at the beginning of each line?
(71%)
How to add a star at the beginning and a hash at the end of line?
(68%)
How to add a word "myword" at the end of each line?
(68%)
How to add a semicolon at the end of each line?
(68%)
How to add a <BR> at the end of each line?
(68%)
Check Demo of
Advanced search and replace
Keywords:
at the beginning
beginning
begin
line number
how to add a line
add a line
number
each line
ber
num
add to beginning
add text beginning
add a number each line
add line number
beginning of line
beginning line
number each line
add text each line