RegexSearch

Kategorie: Script / Strings
Ab Engineversion: 8.0 OC

Beschreibung

Performs a regular expression match, returning an array of match positions.

Syntax

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

Parameter

text:
String to search in.
regex:
Regular expression in ECMAScript syntax.
flags:
Bitmask of the following values:
Konstante Beschreibung
Regex_CaseInsensitive Regular expression is case insensitive.
Regex_FirstOnly Stop after first match, returning an array with zero or one elements.

Beispiel

Log("%v", RegexSearch("hello world", "l"));
Searches for the character l, returning [2, 3, 9].
Siehe auch: RegexMatch, RegexReplace, RegexSplit
Luchs, 2016-09