WolframLang: String Replace
Replace by Position
StringReplacePart
-
replace string by position.
StringReplacePart[ "some dogs", "cat", {6, 8}] === "some cats"
Replace by String Pattern
StringReplace
-
replace string by String pattern (regex) .
StringReplace[ "some dogs" , {"dog" -> "cat"}] === "some cats"