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