How to find numbers and start new lines with the numbers
I know how to find numbers in text but I don’t know how to start new lines with those numbers. I want to start new lines with those numbers (which are increasing).
The text is ;
“1. “It isn’t so foggy today as it was yesterday” 2. “You can keep that book, if you like, Joan”,3. “Are you leaving today or tomorrow morning?” 4. “How far is it? And how long will it take me to get there?” 5. “Nothing grows in my garden. It never gets any sun”,”
What I want is;
"1. “It isn’t so foggy today as it was yesterday”
- “You can keep that book, if you like, Joan”,
- “Are you leaving today or tomorrow morning?”
- “How far is it? And how long will it take me to get there?”
- “Nothing grows in my garden. It never gets any sun”,"
without losing the digital numbers at the beginning of the lines.
- Find what :
- Replace with :
☑ Regular Expression
Finds a single character followed by one or more digit characters followed by a period.
Replaces with the single character, a newline, and leaves the original digit(s)+period intact.
- Find what :
I would just make this slight tweak, as probably most users including the OP are using Windows and thus expect Windows line-endings:
Replace with zone:
It worked well for me
Thanks. Some of the programming languages I use are EOL-aware, so when I output
\n, it actually does
CRLFon Windows; thus, I sometimes forget in regex substitutions that
\nis really just the
LFportion (and since Notepad++ showed a new line between, and I didn’t have line-endings visible, when I tried the regex, I didn’t notice my mistake).