unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: regexp newline issue
Date: Wed, 30 Nov 2005 23:38:47 -0500	[thread overview]
Message-ID: <87fypdsa9d.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.17016.1133155392.20277.help-gnu-emacs@gnu.org

>   (mapconcat (lambda (char)
>                (if (memq char '(32 9 10 13))
>                    "[\040\011\012\015]"
>                  (format "[\040\011\012\015]*%c" char)))
>              string nil))

Other than to force the reader to try and remember those ASCII codes, is
there any reason not use:

  (mapconcat (lambda (char)
               (if (memq char '(?\t ?\n ?\r ?\ ))
                   "[\t\n\r ]"
                 (format "[\t\n\r ]*%c" char)))
             string nil))


-- Stefan

  parent reply	other threads:[~2005-12-01  4:38 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
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 [this message]
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=87fypdsa9d.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    /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).