From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Patrick Drechsler Newsgroups: gmane.emacs.help Subject: Regepxp-help: Replacing foo with bar but not foo.* Date: Fri, 18 Aug 2006 22:19:22 +0200 Organization: University of Cambridge, England Message-ID: <87k655x0dx.fsf@pdrechsler.de> Reply-To: patrick@pdrechsler.de NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155933625 18934 80.91.229.2 (18 Aug 2006 20:40:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Aug 2006 20:40:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 18 22:40:23 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GEB8e-0007zl-O1 for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Aug 2006 22:40:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GEB8d-0003QX-Nw for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Aug 2006 16:40:19 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!news.banetele.no!dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAACXBIWXMAAAsSAAALEgHS3X78 AAACL0lEQVRIx5WUy5XDIAxFacN10Ima0Za1KlAXqkR10AArFpyR+NhOxjMhOjH+hIveE5/Qvozw 9i4o3wGZRTYBLeNeRbeADMB5PHKuW5Jq4TH2vylePGS+2i1Au18q3wG6W6UpplLbA7KIJNC2SvUJ UMHGIYQD2x5AVvoKRoS0DzQDACFvAcCl6hGQWk11A1AAiEcIPrrkDYAwun4HPtR1AAXDCJCyt7xh 9D8Q4t484AJiMPs7HpakKewjULrnqAvE+gGwwqqWInECwfaQ2Vf9tfkGYFvfNj9LTgsAOMLy9bIe O5BxHQAcHiPSmSn0WTjrcml6D9B6AnSmFCW1Qh3HEzKGNYAm26qq5CqZK8ET0ddMUD4PlSzKdoxV u8ujLC21hVKXgYKC1tnPvsb4BETrGlxOrUWFwVNxr5XV+dG9uofsfREZbZrMc7bWZgwfU9jRHgql BJQQIdkDJkK/J7xm7l5bA7J3sHCgX6mDZJv7N5AM0DQBhJ6kB/gr4XuOSHwBhBjxBJDsMugFOdDO iCtDAu8ys+EwZIMct/72sYQmMwNFE7VSxO7K8ri22KP/iQ7gykDmFJeJ1ZxjdNkmqWkvpL30Mv0L oM/DkjT6zkLZDWk9n93tugEEN8yV4QQIT0EpsS+NVUq6ZPRnvKtZ0B0YX+Y8rOYtPIOuIt3GiX8A 3XThJX7Vd6p5AKT6Fq1sJq0o9usT5bKGaX8nv0aLqcxjRvseYNuZ2iPnkv3Le/hh8QNVWQzQJ6CD 4AAAABp6VFh0SlBFRy1Db2xvcnNwYWNlAAB42jMCAAAzADMRFn5jAAAAJ3pUWHRKUEVHLVNhbXBs aW5nLWZhY3RvcnMAAHjaM6ow0jGsMARhABGDAulkDxtiAAAAAElFTkSuQmCC User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:GOGNC5QPW7SzZnguCNj/VwzAS40= Original-Lines: 26 Original-NNTP-Posting-Host: 89.54.32.57 Original-X-Trace: news.sunsite.dk DXC=mJ[BU_TF8YXU2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36769 Archived-At: Hi, how do I replace the term `foo' with `bar' when `foo' is followed by a conditional term? Or what do I have to pass as argument to `M-x replace-string'? the rule I'm trying to imply is "replace foo if it is not followed by a dot". INPUT foo jfkda foo.bar fdjak OUTPUT fooMYREPLACEMENT jfkda foo.bar fdjak TIA Patrick -- "If you choke a smurf, what color does it turn?"