unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Searching in occur for ^(?:M|C)
@ 2005-11-24 17:41 Lennart Borgman
  0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2005-11-24 17:41 UTC (permalink / raw)


What do I enter in occur (M-x occur) to search for the pattern in the 
subject line? (I have omitted all escaping there.)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Searching in occur for ^(?:M|C)
       [not found] <mailman.16616.1132854123.20277.help-gnu-emacs@gnu.org>
@ 2005-11-24 18:45 ` Anselm Helbig
  2005-11-24 19:23   ` Lennart Borgman
  0 siblings, 1 reply; 3+ messages in thread
From: Anselm Helbig @ 2005-11-24 18:45 UTC (permalink / raw)


hi lennart, 

what do you mean, you have some sourcecode where this regex occurs,
and you want to find the matching lines? then you'd have to use sth
like this:

	\^(\?:M|C)

if you want to match lines that begin with M or C, then it'd have to
be:

	^\(?:M\|C\)

HTH, regards, 

anselm

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Searching in occur for ^(?:M|C)
  2005-11-24 18:45 ` Searching in occur for ^(?:M|C) Anselm Helbig
@ 2005-11-24 19:23   ` Lennart Borgman
  0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2005-11-24 19:23 UTC (permalink / raw)
  Cc: help-gnu-emacs

Anselm Helbig wrote:

>hi lennart, 
>
>what do you mean, you have some sourcecode where this regex occurs,
>and you want to find the matching lines? then you'd have to use sth
>like this:
>
>	\^(\?:M|C)
>
>if you want to match lines that begin with M or C, then it'd have to
>be:
>
>	^\(?:M\|C\)
>
>HTH, regards, 
>
>anselm
>  
>
Yes, thanks, that helped. I will try to remember now that it is just a 
single \ for escaping when prompted for a pattern...

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-24 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.16616.1132854123.20277.help-gnu-emacs@gnu.org>
2005-11-24 18:45 ` Searching in occur for ^(?:M|C) Anselm Helbig
2005-11-24 19:23   ` Lennart Borgman
2005-11-24 17:41 Lennart Borgman

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).