From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kamphausen@creativepharma.com (Stefan Kamphausen) Newsgroups: gmane.emacs.help Subject: I can't believe: replace regexp in a string Date: 14 Feb 2003 00:37:55 -0800 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <62ede926.0302140037.4db6c80a@posting.google.com> NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1045212041 7832 80.91.224.249 (14 Feb 2003 08:40:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 14 Feb 2003 08:40:41 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jbOg-00021s-00 for ; Fri, 14 Feb 2003 09:40:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18jbPG-00075p-06 for gnu-help-gnu-emacs@m.gmane.org; Fri, 14 Feb 2003 03:41:14 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-NNTP-Posting-Host: 217.226.221.91 Original-X-Trace: posting.google.com 1045211876 29207 127.0.0.1 (14 Feb 2003 08:37:56 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 14 Feb 2003 08:37:56 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:110171 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6674 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6674 Dear elispWizards, somehow I can't believe it. When I try to replace a regexp in a string I have to create a temporary buffer and use the usual buffer replacement commands or write a loop over the sequence. Is that true? I have found a posting in this group describing that and have looked at the XEmacs sources of subr.el where a defun replace-in-string is defined which does one of the above procedures depending on the length of the string. Having coded in Perl a good deal this seems quite strange to me, but if it is the elispish way to do it, I'll give in :-) Best Regars and Thanks Stefan Kamphausen