[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp-builder shows matches, re-search-forward fails?
From: |
Thorsten Jolitz |
Subject: |
Re: regexp-builder shows matches, re-search-forward fails? |
Date: |
Thu, 26 Jul 2012 13:29:30 +0200 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) |
Tassilo Horn <tassilo@member.fsf.org> writes:
> Thorsten Jolitz <tjolitz@googlemail.com> writes:
>
Hi Tassilo,
>> 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?
it copies the regexp from regexp-builder for use in an elisp function,
thats what I need.
> 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.
Thats true, when I use \(foo\|bar\) in M-x re-search-forward it matches
again. But in my function, neither \( nor \\( nor \\\\( work. Maybe
something else wrong with with function - have to check again. Thanks.
--
cheers,
Thorsten
- regexp-builder shows matches, re-search-forward fails?, Thorsten Jolitz, 2012/07/26
- Re: regexp-builder shows matches, re-search-forward fails?, Jambunathan K, 2012/07/26
- Re: regexp-builder shows matches, re-search-forward fails?, Jambunathan K, 2012/07/26
- Re: regexp-builder shows matches, re-search-forward fails?, Thorsten Jolitz, 2012/07/26
- Re: regexp-builder shows matches, re-search-forward fails?, Eric Abrahamsen, 2012/07/26
Re: regexp-builder shows matches, re-search-forward fails?, Tassilo Horn, 2012/07/26
- Re: regexp-builder shows matches, re-search-forward fails?,
Thorsten Jolitz <=