From: Nikolaj Schumacher <n_schumacher@web.de>
To: Thr4wn <Seth.A.Bird@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Regex Problem
Date: Tue, 22 Jul 2008 14:29:07 +0200 [thread overview]
Message-ID: <sa2abgaayr0.fsf@nschum.de> (raw)
In-Reply-To: <fd592f3c-6125-4b36-b133-7370f84e379d@l64g2000hse.googlegroups.com> (Thr4wn's message of "Mon\, 21 Jul 2008 14\:47\:00 -0700 \(PDT\)")
Thr4wn <Seth.A.Bird@gmail.com> wrote:
> In an emacs regexp, you can directly enter a newline character as a
> possible match by hitting C-j (will appear as ^J in the regexp) and/or
> C-q C-m
You can, but you should most definitely not. It just makes the text
hard to read or edit in anything other than Emacs. Just use \n.
> Since Windows requires all lines to end with \r\n, I would allow for
> either ^J or ^M in the search).
I believe Emacs buffers will only contain \n even for Windows files.
> On Jul 19, 1:50 pm, travis jeffery <eatsleepg...@gmail.com> wrote:
>> So I set up a tumblr post document as:
>> title:
>> body:
>>
>> So get the title I use (string-match "\\title: \(.*\)\$"), which is fine
What do you mean by document? A file or a buffer? If so, why do you
use string-match? You can just search around in the buffer, which
should be more efficient.
regards,
Nikolaj Schumacher
next prev parent reply other threads:[~2008-07-22 12:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.15059.1216536041.18990.help-gnu-emacs@gnu.org>
2008-07-20 7:48 ` Regex Problem Xah
2008-07-21 16:23 ` John Paul Wallington
2008-07-21 21:47 ` Thr4wn
2008-07-22 12:29 ` Nikolaj Schumacher [this message]
[not found] ` <mailman.15163.1216729783.18990.help-gnu-emacs@gnu.org>
2008-07-23 19:30 ` Thr4wn
2008-07-23 19:57 ` Drew Adams
2008-07-23 22:36 ` Bernardo Bacic
2008-07-23 22:43 ` Drew Adams
2008-07-24 11:18 ` Nikolaj Schumacher
2008-07-19 17:50 travis jeffery
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sa2abgaayr0.fsf@nschum.de \
--to=n_schumacher@web.de \
--cc=Seth.A.Bird@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.