Description

Split string into an array of its words. A word character is a letter, a number, or an underscore.

Syntax

words(text, pattern)

Parameters

Input ParameterTypeDescription
textstringThe string to inspect.
pattern (optional)stringThe pattern to match words.

Return value

Type
Array

Sample

ExampleResultDescription
words('fred, barney, & pebbles');['fred', 'barney', 'pebbles']Returns the words of a text

To view all the String functions, click here.

See Also