Splits a string by a regex pattern.
Invalid patterns return an empty array.
input string.
regular expression pattern.
split tokens.