[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help with Regexps
From: |
Santiago Mejia |
Subject: |
Re: help with Regexps |
Date: |
Mon, 11 May 2009 12:59:34 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
> I am still curious about the second alternative. Do you, by any chance,
> know how to have regexp exclude a particular string (in this case,
> "\atl") from a search?
Regular expressions are bad at excluding things. You can try to do it
but it gets ugly very soon. I'd rather insert a second step, so your
program would look like this:
(while (search-forward-regexp "^\\\\card{")
(when (not (looking-at "\\\\atl"))
(do-some-stuff)))
HTH,
Anselm