Next: Regexp Replace Prev: Replace Up: Replace
`M-x replace-string RET STRING RET NEWSTRING RET'
Replace every occurrence of STRING with NEWSTRING.
`M-x replace-regexp RET REGEXP RET NEWSTRING RET'
Replace every match for REGEXP with NEWSTRING.
To replace every instance of `foo' after point with `bar', use the
command `M-x replace-string' with the two arguments `foo' and `bar'.
Replacement happens only in the text after point, so if you want to
cover the whole buffer you must go to the beginning first. All
occurrences up to the end of the buffer are replaced; to limit
replacement to part of the buffer, narrow to that part of the buffer
before doing the replacement (Note: Narrowing.).
When `replace-string' exits, point is left at the last occurrence
replaced. The position of point where the `replace-string' command was
issued is remembered on the mark ring; use `C-u C-SPC' to move back
A numeric argument restricts replacement to matches that are
surrounded by word boundaries.
automatically generated by info2www