regex

Represents a regular expression

Methods

find(string substring) finds instances of this regular expression within the given string and returns an array of the results
match(string string) returns an array containing the match groups if the entire string matches this regular expression, otherwise returns null

Method Documentation


array find(string substring)

Finds instances of this regular expression within the given string and returns an array of the results.
Each result is a table containing two slots: "match" gives the matched substring and "index" gives the integer position of this match within the larger string

Parameters

Returns


array match(string string)

Returns an array containing the match groups if the entire string
matches this regular expression, otherwise returns null

Parameters

Returns



Creative Commons Logo This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.