# How do I split a wrapped numeric list into several lines?

I have some text in this format all on 1 line:

1v YHWH said, Let us make man in our image, after our likeness, and God created man in his own image. 2v And God formed man from the ground, and he blew into his nostrils the breath of life, and man became a living soul endowed with speech. 3v And the Lord said, It is not good for man to be alone; I will make unto him a helpmeet. 4v And the Lord caused a deep sleep to fall upon Adam, and he slept, and he took away one of his ribs, and he built flesh upon it, and formed it and brought it to Adam, and Adam awoke from his sleep, and behold a woman was standing before him. 5v And he said, This is a bone of my bones and it shall be called woman, for this has been taken from man; and Adam called her name Eve, for she was the mother of all living.

I want to look like this:

1v YHWH said, Let us make man in our image, after our likeness, and God created man in his own image.
2v And God formed man from the ground, and he blew into his nostrils the breath of life, and man became a living soul endowed with speech.
3v And the Lord said, It is not good for man to be alone; I will make unto him a helpmeet.
4v And the Lord caused a deep sleep to fall upon Adam, and he slept, and he took away one of his ribs, and he built flesh upon it, and formed it and brought it to Adam, and Adam awoke from his sleep, and behold a woman was standing before him.
5v And he said, This is a bone of my bones and it shall be called woman, for this has been taken from man; and Adam called her name Eve, for she was the mother of all living.

I did a regular expression replace like Find: "(\d+)" Replace: "\n$1" I tried a bunch different ways like: --wrap around-regular expression --down [cursor at end] This would get all the verses in order but it would change all the verse numbers to 1? - What is your question? – Shinrai Nov 8 '11 at 17:51 Since it's windows it kind of depends on what editor you use. – Nifle Nov 8 '11 at 17:57 Did you forget the newline before 4v? – Daniel Beck Nov 8 '11 at 19:57 ## 2 Answers If you install Notepad++, you can use regular expressions in its Replace with function. Your attempt is almost correct. • Find what: (\d+)v • Replace with: \n\1v Note that I used \1 instead of $1.

-
I get more respect for Notepad++ every day –  Ivo Flipse Nov 8 '11 at 19:53
Scintilla Text Editor handles RegExp too. –  music2myear Nov 8 '11 at 21:51
yeah I've done similar split operations with N++, FTW! –  Sathya Nov 10 '11 at 7:05

If you like to work from the command line, using sed, this is simply:

C:\> sed -i 's/$$[0-9]\+$$v/\n\1/g' path\to\yourfile.txt

-
I'll add my upvote if you edit your question to include how to install sed for windows. –  Nifle Nov 11 '11 at 19:01
Met you halfway, by including a link for sed for Windows. Personally, I use Cygwin, but that seems like overkill (and certainly no easier than installing NPP.) –  Eric Wilson Nov 11 '11 at 19:16