The split command.
words = @string1.split(/\W+/)
will split the string into an array based on a regular expression. \W means any “non-word” character and the “+” means to combine multiple delimiters.
The split command.
words = @string1.split(/\W+/)
will split the string into an array based on a regular expression. \W means any “non-word” character and the “+” means to combine multiple delimiters.