From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joe Fineman Newsgroups: gmane.emacs.help Subject: Regexp to match any character, including newline? Date: 04 Oct 2003 18:02:06 -0400 Organization: The World : www.TheWorld.com : Since 1989 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1065305806 24665 80.91.224.253 (4 Oct 2003 22:16:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2003 22:16:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 05 00:16:45 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A5uhh-0007D7-00 for ; Sun, 05 Oct 2003 00:16:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A5uh3-0007Nd-44 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Oct 2003 18:16:05 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!newsfeed.telus.net!news3.optonline.net!ash.uu.net!nntp.TheWorld.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-NNTP-Posting-Host: pip1-3.std.com Original-X-Trace: pcls3.std.com 1065304925 26928 192.74.137.183 (4 Oct 2003 22:02:05 GMT) Original-X-Complaints-To: abuse@TheWorld.com Original-NNTP-Posting-Date: Sat, 4 Oct 2003 22:02:05 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:117059 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12987 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12987 It is sometimes a nuisance that "." in a regexp does not match newlines. For example, I want a regexp for text in parentheses that contains the word "and" followed (anywhere) by a date. (.+ and .+ [1-2][0-9][0-9][0-9].+) works only if the expression happens to be on one line. I have tried [^ ] with the space replaced by an unlikely character such as ASCII 000; that seems to work in isolation, but when I substitute it for . in the above regexp, the result misbehaves, missing all the right matches & finding the odd wrong one. Is there an obvious solution to this problem? -- --- Joe Fineman jcf@TheWorld.com ||: Look on yonder, see that eagle rise. :|| ||: He was born on land, but he sure enjoys the skies. :||