help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rx vs sregex - a "match" to the death


From: Oliver Scholz
Subject: Re: rx vs sregex - a "match" to the death
Date: Mon, 06 Oct 2003 10:55:14 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (windows-nt)

Martin Stone Davis <m0davis@pacbell.net> writes:

[backrefs in regexps]

> I think you're using backreference wrongly.  Try the one I gave.

<forehead-slap/>

Silly me.

> It matches "Go, Spot, Go" OR "Run, Spot, Run". If I run
>
> (re-search-forward (sregexq (group (or "Go" "Run"))
>                              ", Spot, "
>                              (backref 1))
>
> It finds either of those two phrases.
[...]

Thanks. That's nifty.

    Oliver
-- 
15 Vendémiaire an 212 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]