[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: re-search beginning of line or whitespace
From: |
Tim Johnson |
Subject: |
Re: re-search beginning of line or whitespace |
Date: |
Wed, 2 Nov 2005 08:19:14 -0900 |
User-agent: |
Mutt/1.4.2.1i |
* Neon Absentius <absent@sdf.lonestar.org> [051101 18:30]:
> On Tue, Nov 01, 2005 at 05:39:46PM -0900, thus spake Tim Johnson:
> > (re-search-backward "^\|[\t ]") ;; gives me an error
> >
> > What am I leaving out.
>
> A slash ;)
Thanks Neon:
> The correct syntax is (re-search-backward "^\\|[\t ]") with your
> syntax you are searcing for a line starting with a pipe ("|") and
> continuing with white space. Appanently your buffer doesn't contain
> such a line.
Let me see if I understand the logic of this strange creature called
"regular expressions":
"^" ;; match beginning of line
"\\|" ;; seperator for alternatives
"[\t ]" ;; match any of: TAB, SPACE
Am I correct?
I get confused by the way that emacs "escapes" metacharacters.
Thanks again
tim
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
$B:G?78D<<3+J|(B, info, 2005/11/01