in reply to How can I replace space sequences in a string with the number of spaces in each sequence?

Something like s/(\s+)/length($1)/ge ?

This is untested code, please show some effort applying, questioning and understanding it.

Cheers Rolf

PS: Je suis Charlie!

  • Comment on Re: How can I replace space sequences in a string with the number of spaces in each sequence?
  • Download Code