split() converts the "subject" string into a node-set of <token> elements. The optional pattern is a Perl-compatible regular expression (without delimiters). It is used to split the input string. If no pattern is given, the string is split at every block of whitespace characters (space, tab, newline).