Probably not very efficient, but the best I can come up with at short notice:
$str =~ s/(\S) (\S)/$1$2/g;Update:See Roy Johnson's comment above on Trix606's similar snippet. Code fixed for single spaces at start and end of string:
s/(\S|^) (\S|$)/$1$2/g;In reply to Re: Regular Expressions: Removing 'only' single spaces from a string
by Not_a_Number
in thread Regular Expressions: Removing 'only' single spaces from a string
by BioBoy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |