comparison lisp/subr.el @ 48077:69077a78e52f

(replace-regexp-in-string): Doc fix.
author Andreas Schwab <schwab@suse.de>
date Tue, 29 Oct 2002 23:40:47 +0000
parents 0bb8dc016c43
children 33dafec6a9de
comparison
equal deleted inserted replaced
48076:cfd8d2ecd2a8 48077:69077a78e52f
1788 the replacement passed to `replace-match'; the match-data at this 1788 the replacement passed to `replace-match'; the match-data at this
1789 point are such that match 0 is the function's argument. 1789 point are such that match 0 is the function's argument.
1790 1790
1791 To replace only the first match (if any), make REGEXP match up to \\' 1791 To replace only the first match (if any), make REGEXP match up to \\'
1792 and replace a sub-expression, e.g. 1792 and replace a sub-expression, e.g.
1793 (replace-regexp-in-string \"\\(foo\\).*\\'\" \"bar\" \" foo foo\" nil nil 1) 1793 (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1)
1794 => \" bar foo\" 1794 => \" bar foo\"
1795 " 1795 "
1796 1796
1797 ;; To avoid excessive consing from multiple matches in long strings, 1797 ;; To avoid excessive consing from multiple matches in long strings,
1798 ;; don't just call `replace-match' continually. Walk down the 1798 ;; don't just call `replace-match' continually. Walk down the