FUNCTION REFERENCE
replace
Replace literal text within each string.
Replace literal text within each string.
Syntax
s = replace(s,old,new)Each old/new pair is applied in order to every subject. Char and cellstr inputs retain their type.
Example
replace(["ab" "ac"],"a","z")Differences from MATLAB: bounded 2-D string storage (65536 elements, 2 MiB text); MAT persistence and N-D strings are not implemented.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.