From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Slass Newsgroups: gmane.emacs.help Subject: Re: another newbie question -- auto-mode-alist regexp Date: Mon, 23 Sep 2002 23:17:37 GMT Organization: AT&T Broadband Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032824177 11591 127.0.0.1 (23 Sep 2002 23:36:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 23 Sep 2002 23:36:17 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17tckS-00030o-00 for ; Tue, 24 Sep 2002 01:36:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17tckW-0001Ug-00; Mon, 23 Sep 2002 19:36:20 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-xit-04!sn-xit-08!supernews.com!12.120.28.37.MISMATCH!attla2!ip.att.net!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: 12.228.19.12 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: sccrnsc01 1032823057 12.228.19.12 (Mon, 23 Sep 2002 23:17:37 GMT) Original-NNTP-Posting-Date: Mon, 23 Sep 2002 23:17:37 GMT Original-Xref: nntp.stanford.edu gnu.emacs.help:105205 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1762 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1762 Michael Slass 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 m emacs m regexps > >BOL. > >-- >Mike Slass There's an extra in my instructions above. This is correct: C-h i m emacs m regexps -- Mike Slass