array split(text, regex)
Returns an array with the text split around matches of the delimiter regular expression. If the regular expression contain capture groups, the matching parts of the delimiter will also be included in the resulting array as separate elements.
Flags embedded as a prefix in regex:
Flag | Description |
---|---|
(?d) | Unix lines mode |
(?i) | Case-insensitive matching (US-ASCII only) |
(?iu) | Case-insensitive matching (Unicode, preferred) |
(?m) | Multiline mode |
(?s) | Dotall mode, use it when matching a multiple line value |
(?u) | Unicode-aware case folding |
(?x) | Ignore whitespace and comments in pattern |