occurrences of \var{pattern} in \var{string} by the replacement
\var{repl}. If the pattern isn't found, \var{string} is returned
unchanged. \var{repl} can be a string or a function; if a function,
-it is called for every non-overlapping occurance of \var{pattern}.
+it is called for every non-overlapping occurrence of \var{pattern}.
The function takes a single match object argument, and returns the
replacement string. For example: