RegexSplit

Kategorie: Script / Strings
Ab Engineversion: 8.0 OC

Beschreibung

Splits a string into an array of strings.

Syntax

array RegexSplit(string text, string regex, int flags);

Parameter

text:
String to split in parts.
regex:
Regular expression matching the separator in ECMAScript syntax.
flags:
Bitmask of the following values:
Konstante Beschreibung
Regex_CaseInsensitive Regular expression is case insensitive.
Regex_FirstOnly Split the string only once.

Beispiel

Log("%v", RegexSplit("Harry!, Sven2 & Maikel", "\\s*[,&]\\s*"));
Splits a list of names, returning ["Harry!", "Sven2", "Maikel"].
Siehe auch: RegexMatch, RegexReplace, RegexSearch
Luchs, 2016-09