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

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

Re: regexp-builder shows matches, re-search-forward fails?


From: Tassilo Horn
Subject: Re: regexp-builder shows matches, re-search-forward fails?
Date: Thu, 26 Jul 2012 13:17:13 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

Thorsten Jolitz <tjolitz@googlemail.com> writes:

Hi Thorsten,

> I constructed a regexp with regexp-builder for a buffer, the matches
> are clearly shown, with all the subexpressions in different colors.
> Then I do reb-copy and paste the regexp as argument for a
> re-search-forward call.  In the same buffer I used to build the
> regexp, re-search-forward now fails to match anything.
>
> What might be the reason? 

What's reb-copy?

The problem might be that re-builder wants the regex as string, so you
have to quote backslashes.  E.g., re-builder wants "\\(foo\\|bar\\)",
but at the re-search-forward prompt you have to say just \(foo\|bar\)
and emacs does the quoting for you.

Bye,
Tassilo




reply via email to

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