From: John Paul Wallington <jpw@pobox.com>
Subject: Re: regexp newline issue
Date: Mon, 28 Nov 2005 04:44:47 +0000 [thread overview]
Message-ID: <uoe45nzy8.fsf@FILTH.SHOOTYBANGBANG.COM> (raw)
In-Reply-To: <yzlmzjplh2g.fsf@rgassoc-cs.local> (Christopher C. Stacy's message of "Mon, 28 Nov 2005 01:03:19 GMT")
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.
next prev parent reply other threads:[~2005-11-28 4:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-28 1:03 regexp newline issue Christopher C. Stacy
2005-11-28 4:44 ` John Paul Wallington [this message]
2005-11-28 5:22 ` John Paul Wallington
[not found] ` <mailman.17016.1133155392.20277.help-gnu-emacs@gnu.org>
2005-12-01 4:38 ` Stefan Monnier
2005-11-29 18:23 ` Kevin Rodgers
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=uoe45nzy8.fsf@FILTH.SHOOTYBANGBANG.COM \
--to=jpw@pobox.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).