From: Joe Fineman <jcf@TheWorld.com>
Subject: Regexp to match any character, including newline?
Date: 04 Oct 2003 18:02:06 -0400 [thread overview]
Message-ID: <wkisn4mzkx.fsf@TheWorld.com> (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. :||
next reply other threads:[~2003-10-04 22:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-04 22:02 Joe Fineman [this message]
2003-10-04 22:46 ` Regexp to match any character, including newline? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wkisn4mzkx.fsf@TheWorld.com \
--to=jcf@theworld.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).