substitute a character string by another in a character string
string_out = strsubst(string_in, searchStr, replaceStr) string_out = strsubst(string_in, searchStr, replaceStr, "regexp")
a matrix of character strings. The strings where to
search occurrences of searchStr.
a character string. The string to search in
string_in.
a character string. The replacement string.
a matrix of character strings. The result of the
substitution on searchStr by
replaceStr in string_in.
Then searchStr is used as a regular expression.
The strsubst function replaces all occurrences of
searchStr in string_in by
replaceStr.
When using the forth parameter "r", the searchStr should be a
string of regular expression. And then strsubst is going to match it with
string_in and replace according to the regular expression rules.
The rules of regular expression are processed by PCRE2. For a quick syntax tour, see regexp. For full syntax specification, see the regular expressions supported by PCRE2.