in reply to Re^2: Counting characters without a space
in thread Counting characters without a space
I don't know what the "s+" does.
It isn't "s+" but rather "\s+" - a small but very important distinction. \s is a character class which includes all whitespace (spaces, tabs, newlines). The + metacharacter matches one or more of the preceding item so this combination matches one or more consecutive whitespaces. See perlre or the Monastery's own tutorials for more on regular expressions.
|
|---|