Answer the question
In order to leave comments, you need to log in
How to number lines in a text file?
Hi all! Please help with line numbering in a regular txt file. I believe that this is done using regular expressions, but I myself can not "finish" how?
There is such a file, it contains lists that I need to turn into numbered arrays, i.e.:
text1, text1, text1
text2, text2, text2 It is
necessary to add at the beginning and at the end to var Arr_нумерация = [ ]
end up like this:
var Arr_1 = [text1, text1, text1]
var Arr_2 = [text2, text2, text2]
I can add characters, but here's how to do auto numbering, please help.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question