Result is the input string split into a sequence of strings, where the supplied regular expression pattern match defines the separator. The separator strings are not output by the result parameter. Optional flags may also be used.
In the example shown above, input string is a succession of characters separated by spaces and/or commas, i.e.
a , b c,d
The regex pattern defines a character class ["space""comma"] - of which one and only one character will be matched in a character class, i.e. either space or comma.
The + quantifier specifies "one or more" occurrences of the character class/string.
The result string is:
There are slight differences in regular expression syntax between the various languages.
For more information, see Regular expressions.