From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Paul Wallington Newsgroups: gmane.emacs.help Subject: Re: regexp newline issue Date: Mon, 28 Nov 2005 04:44:47 +0000 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133153157 1887 80.91.229.2 (28 Nov 2005 04:45:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2005 04:45:57 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 28 05:45:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgatF-00037C-O7 for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Nov 2005 05:45:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgatF-00084s-0e for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Nov 2005 23:45:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Egasx-000840-0G for help-gnu-emacs@gnu.org; Sun, 27 Nov 2005 23:45:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Egasu-00083X-Eq for help-gnu-emacs@gnu.org; Sun, 27 Nov 2005 23:45:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Egasu-00083T-8C for help-gnu-emacs@gnu.org; Sun, 27 Nov 2005 23:45:00 -0500 Original-Received: from [208.210.124.75] (helo=thorn.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Egasu-0002tZ-DB for help-gnu-emacs@gnu.org; Sun, 27 Nov 2005 23:45:00 -0500 Original-Received: from thorn (localhost [127.0.0.1]) by thorn.pobox.com (Postfix) with ESMTP id 95DC8E7 for ; Sun, 27 Nov 2005 23:45:21 -0500 (EST) Original-Received: from FILTH.SHOOTYBANGBANG.COM (FILTH.SHOOTYBANGBANG.COM [217.169.11.183]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by thorn.sasl.smtp.pobox.com (Postfix) with ESMTP id 3A96F456 for ; Sun, 27 Nov 2005 23:45:21 -0500 (EST) Original-To: help-gnu-emacs@gnu.org X-Mailer: Norman X-Attribution: JPW X-Face: #uahb@^mo@bA"{q'"a4y[w$n3/V:haD\; YenWcT7)kXYx3/>#[DD9ExVe}; 9FG6X`l!Dm"V peub=u!&&?}s~{TOPtGdH)KA}/qCr; d"Gr*'9_V1PE@+K'tk2/Iq@PBKtJ+]&,CP9_Fl8'*R]LCR0| 6q; Xey'`:DX+)S.]p[KP^sNe`8B\W6(Nw{o5i)y+I!h=0bU5L`Tj`~Q0!G"t(s7o7eh)J\>P>,!~/w $$jGEVa%H%8(jTv In-Reply-To: (Christopher C. Stacy's message of "Mon, 28 Nov 2005 01:03:19 GMT") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:31447 Archived-At: cstacy@news.dtpq.com (Christopher C. Stacy) writes: > I want to search for a string like "foo bar", > but there might be whitespace (even newlines) > between any of the characters. > > Given the string "foo bar", I tried constructing a regexp by > > (replace-regexp-in-string "\\(.\\)" > "[\040\011\012\015]*\\1" > "foo bar") > but that doesn't quite do it. I think you wanna zap all the whitespace chars from your "foo bar" string first (eg: so that it's "foobar") before doing the `replace-regexp-in-string' hack on it.