Regex.new
Regex.new(pattern: string): Regex
Compiles a pattern and returns an object with Match, MatchMany and Replace. Raises if the pattern does not compile.
Example
local re = Regex.new("%d+")
print(re:Match("abc 123")) --> 123Compiles a pattern and returns an object with Match, MatchMany and Replace. Raises if the pattern does not compile.
local re = Regex.new("%d+")
print(re:Match("abc 123")) --> 123