Yuari
Documentation
Docs/Regex/Regex.Escape

Regex.Escape

Escapes regex metacharacters.

Syntax

Regex.Escape(text: string) -> any

Parameters

ParameterTypeDescription
textstringThe text value to process.

Returns

TypeDescription
anyThe value produced by the call.

Description

Regex.Escape 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 call is read-only: it resolves the current value when invoked and does not change the underlying state.

Example

print(Regex.Escape("1+1=2"))

Notes

  • Regex patterns use the module's engine; refer to its flag syntax rather than Lua patterns.