Name
regexpsub — Regex Substitution
Synopsis
string
regexpsub
( |
string
INPUT
, |
|
string
PATTERN
, |
|
string
OUTPUT
) ; |
Parameters
-
string
INPUT
-
string
PATTERN
-
string
OUTPUT
Description
Searches a string for a POSIX Extended Regular Expression match and returns OUTPUT with the matched subexpressions substituted or nil if no match was found.
Usage
regexpsub ("aaabbb", "(.*ab)", "s_\\1_e") -> "s_aaab_e"
regexpsub ("aaabbb", "(.*ba)", "s_\\1_e") -> nil