unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Regexp to match any character, including newline?
@ 2003-10-04 22:02 Joe Fineman
  2003-10-04 22:46 ` Stefan Monnier
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Joe Fineman @ 2003-10-04 22:02 UTC (permalink / raw)


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.  :||

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-10-06  8:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-04 22:02 Regexp to match any character, including newline? Joe Fineman
2003-10-04 22:46 ` Stefan Monnier
2003-10-04 22:59 ` Jesper Harder
2003-10-05  7:09   ` Martin Stone Davis
     [not found]   ` <mailman.1130.1065337789.21628.help-gnu-emacs@gnu.org>
2003-10-05 20:35     ` Jesper Harder
2003-10-05 21:45 ` Joe Fineman
2003-10-06  8:20 ` Gian Uberto Lauri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).