I am trying to use a regex (javascript) to move periods in a text.
The text looks like this:
This is a text with ending period on wrong line
.
This is a another line
I use this regex:
summary.replace(/[\n\r]\.[\s\n\r]/gm, '.\r')
to make it look like this:
This is a text with ending period on wrong line.
This is a another line
But instead it looks like this:
This is a text with ending period on wrong line
.his is a another line
Cant figure out what is wrong in my regex.
Anyone?
Use this regex
replace it with
.