Regex:Status
Returns whether the regex object is valid and an optional error message.
Syntax
Regex:Status() -> boolean
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
boolean | Whether the regex object is valid and an optional error message |
Description
Regex:Status is part of the Regex library. Regex wraps a compiled pattern object. Matching and replacement follow the module's regex engine rather than Lua patterns.
The operation is performed immediately using the arguments supplied at the call site.
Example
local re = Regex.new("(%a+)")
print(re:Status())
Notes
- Regex patterns use the module's engine; refer to its flag syntax rather than Lua patterns.