re-replace ( string regexp replacement -- result )
Regular expressions ยป Matching operations with regular expressions

Prev:re-split ( string regexp -- seq )
Next:re-replace-with ( string regexp quot: ( slice -- replacement ) -- result )


Vocabulary
regexp

Inputs
stringa string
regexpa regexp
replacementa string


Outputs
resulta string


Word description
Replaces substrings which match the input regexp with the given replacement text. The boundaries of the substring are chosen by the strategy used by all-matching-slices.

Examples
USING: prettyprint regexp ; "python is pythonic" R/ python/ "factor" re-replace .
"factor is factoric"


See also
re-replace-with

Definition