in reply to Re: Re: Regex to add space after punctuation sign
in thread Regex to add space after punctuation sign
I would handle end-of-line processing as follows:
A single positive look-ahead is, IMO, more clear than two negative look-aheads.s/(\d[,.]\d)|([^\w\s])(?=\S)/$1 || "$2 "/ge;
Abigail
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Regex to add space after punctuation sign
by dda (Friar) on Jan 08, 2004 at 10:07 UTC |