in reply to Re^2: Regular Expressions: Removing 'only' single spaces from a string
in thread Regular Expressions: Removing 'only' single spaces from a string

In the regular expression, yes it does. In the replacement expression $n is the n'th capture string in the regular expression. So for s/(x) (y)/$1$2)/ 'x y' gets replaced with 'xy' for example.


Perl is Huffman encoded by design.
  • Comment on Re^3: Regular Expressions: Removing 'only' single spaces from a string
  • Download Code