in reply to Regex to add space after punctuation sign
I think most of the solutions so far will fail to put a space into 'x34,3b'.
There is also the question of what to do with '2,3,4,5'? Is that '2,3, 4,5' or '2, 3,4, 5' or '2, 3, 4, 5'? All are possible.
It will probably be very hard to use a single regex to do this if non-numeric bits can start and/or end with a digit.
I got close using s///e, but it was very messy.
|
|---|