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