That replaces one or more contiguous spaces with comma throughout the string, but only if there's a non-space character preceding (positive look-behind).s/(?<=\S) +/,/g;
In reply to Re^2: regex to remove space
by graff
in thread regex to remove space
by perlUser345
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |