Atomic docs

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

lua
local re = Regex.new("%d+")
print(re:Match("abc 123")) --> 123
↑