Methods
replace
ΒΆ
replace(s:
Str
, r:
RegExp
, mapper:
Fun
)
Replace all occurrences of r
Source:
stdlib.ngs:3875
mapper
Function that will be called with one matching string at a time that provides the replacement
Returns
Str
Example
"x10ab20c30y".replace(/[0-9]+/, F(match_text) "[$match_text]") # "x[10]ab[20]c[30]y"