Method RegEx():split() Foundation
Splits a string using the pattern as delimiter.
:split( <cSubject>, [<nLimit>], [<lKeepEmpty>] ) --> aFragments
An array with the string fragments.
Divides the subject string into fragments using matches of the pattern as separators. Similar to tokenizing but with regular expression patterns instead of simple delimiters.
Split
oRegEx := RegEx():create("[,;]+") // Split by comma or semicolon
aFields := oRegEx:split("apple,banana;;cherry")
? aFields // {"apple", "banana", "cherry"}
oRegEx:destroy()
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.