Class: Regex
Static Methods
Regex Regex.new(pattern: string)
Constructs a new Regex object. Errors if the pattern is invalid.
string Regex.Escape(contents: string)
Escapes a string for use by regex.
Methods
Match | nil Regex:Match(contents: string)
Matches contents against this Regex object and returns the first Match, or nil if no match was found.
table Regex:MatchMany(contents: string)
Matches contents against this Regex object and returns all Matches found.
string Regex:Replace(contents: string, replace_with: string)
Replaces the first match of this Regex object in contents with replace_with.