Regex.to_string
Regex.to_string
Function
Returns the script text form of the regular expression.
Syntax
regex(pattern, flags).to_string()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| String | Returns a string of the form /pattern/flags. |
Example
rule = regex('BT', 'i') result = rule.to_string() // Output: /BT/i print result
Notes
- The return value only expresses pattern and flags, without re-escaping pattern.