Insert new line after every comma, colon AND period mark
-
Hello,
I want to make a change in a text I have in which after every comma, colon, AND period mark a new line is inserted; but I want to do all of this at the same time, with a single regular expression. Is it possible?
In the example of my question above, the resulting text would be:
I want to make a change in a text I have in which after every comma, colon, AND period mark a new line is inserted; but I want to do all of this at the same time, with a single regular expression. Is it possible?Thanks in advance!
P.S.:
I was doing this, to insert a new line after every comma:
- Find:
\,\s* - Replace with:
\,\n
But it isn’t a practical solution, since I have to substitute the comma with the other characters, and the text is BIG.
- Find:
-
@Luís-Gonçalves said in Insert new line after every comma, colon AND period mark:
I want to make a change in a text I have in which after every comma, colon, AND period mark a new line is inserted; but I want to do all of this at the same time, with a single regular expression. Is it possible?
Find:
[,:.]
Replace:\r\n
Search mode: Regular expressionNote: If you have “Windows files” which is most-typical, do not use
\nwithout\rin front of it, when replacing. Otherwise, you may “corrupt” your data. -
@Alan-Kilborn said in Insert new line after every comma, colon AND period mark:
@Luís-Gonçalves said in Insert new line after every comma, colon AND period mark:
I want to make a change in a text I have in which after every comma, colon, AND period mark a new line is inserted; but I want to do all of this at the same time, with a single regular expression. Is it possible?
Find:
[,:.]
Replace:\r\n
Search mode: Regular expressionNote: If you have “Windows files” which is most-typical, do not use
\nwithout\rin front of it, when replacing. Otherwise, you may “corrupt” your data.The problem with that regex is that it deletes the commas, colons and period marks, which I don’t want to. I want to keep them as they are, while inserting a new line after them.
-
@Luís-Gonçalves said in Insert new line after every comma, colon AND period mark:
The problem with that regex is that it deletes the commas, colons and period marks, which I don’t want to. I want to keep them as they are, while inserting a new line after them.
Ah, I missed that detail.
Revise the Replace:
$0\r\n
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login