all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Santiago Mejia <mejia@uchicago.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: help with Regexps
Date: Mon, 11 May 2009 12:59:34 -0500	[thread overview]
Message-ID: <877i0n8qrd.fsf@smejia.edu> (raw)
In-Reply-To: 87ocu0hwdf.wl%anselm.helbig+news2009@googlemail.com


> 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





  reply	other threads:[~2009-05-11 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.6983.1242027435.31690.help-gnu-emacs@gnu.org>
2009-05-11  8:33 ` help with Regexps Anselm Helbig
2009-05-11 17:59   ` Santiago Mejia [this message]
2009-05-11  3:12 Santiago Mejia

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=877i0n8qrd.fsf@smejia.edu \
    --to=mejia@uchicago.edu \
    --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.