From: Michael Slass <miknrene@drizzle.com>
Subject: Re: another newbie question -- auto-mode-alist regexp
Date: Mon, 23 Sep 2002 23:17:37 GMT [thread overview]
Message-ID: <m3vg4wxpkw.fsf@localhost.localdomain> (raw)
In-Reply-To: m3znu8xpp8.fsf@localhost.localdomain
Michael Slass <miknrene@drizzle.com> writes:
>In a regexp, backslash is used to escape the following character.
>Since "." is a metacharacter meaning "any character except newline",
>if you want to match an actual dot, like in ".xml", you need to escape
>the dot, as in \.
>
>The next wrinkle is that the regexps you're looking at are represented
>as string constants. In string constants, backslashes are used to
>introduce escape sequences, or characters that are harder to type.
>'\n' represents the newline character, for example. In order to
>introduce a literal backslash into a string constant, you need to
>escape the backslash with another one "\\"
>
>Putting that together, in a regexp string constant, "\\." will match
>exactly one literal dot.
>
>
>In emacs regexps, \' is an anchor regexp:
>
>,----
>| `\''
>| matches the empty string, but only at the end of the buffer or
>| string being matched against.
>`----
>
>You can read all about that in the emacs manual that came with your
>emacs. To read this from within emacs:
>
>C-h i <RET> m emacs <RET> m regexps <RET>
>
>BOL.
>
>--
>Mike Slass
There's an extra <RET> in my instructions above. This is correct:
C-h i m emacs <RET> m regexps <RET>
--
Mike Slass
next prev parent reply other threads:[~2002-09-23 23:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1032821006.2883.help-gnu-emacs@gnu.org>
2002-09-23 23:15 ` another newbie question -- auto-mode-alist regexp Michael Slass
2002-09-23 23:17 ` Michael Slass [this message]
[not found] <mailman.1032823999.4821.help-gnu-emacs@gnu.org>
2002-09-23 23:56 ` Barry Margolin
2002-09-23 22:59 Bingham, Jay
2002-09-23 23:27 ` Robert P. J. Day
2002-09-23 23:34 ` Robert P. J. Day
-- strict thread matches above, loose matches on Subject: below --
2002-09-23 22:43 Robert P. J. Day
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=m3vg4wxpkw.fsf@localhost.localdomain \
--to=miknrene@drizzle.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).