
🔍
Triadic ssr (string search and replace)
Replaces the found substring.
Syntax: ssr[<x>; <y>; <z>]
Whеre:
xis a string to be searched for matches;yis aregexfor search;zis a string to substitute matches, or lambda to be called on each matching substring.
o)ssr["ababa galamaga";"[bg]a";"*"]
"a** *lama*"
o)ssr["ababa galamaga";"[bg]a";{0N!x;"*"}]
"ba"
"ba"
"ga"
"ga"
"a** *lama*"
o)ssr["rent a tent";" ";"0"]
"rent0a0tent"
o)