Skip to content

Instantly share code, notes, and snippets.

@nedzadarek
nedzadarek / replace'.red
Last active March 14, 2018 12:29 — forked from toomasv/replace'.red
`replace` with parse rule for string replacement
Red []
replace': func [
"Replaces values in a series, in place"
series [series!] "The series to be modified"
pattern "Specific value or parse rule pattern to match"
value "New value, replaces pattern in the series"
/all "Replace all occurrences, not just the first"
/deep "Replace pattern in all sub-lists as well"
/local p rule s e many? len pos
][