From: Thorsten Jolitz <tjolitz@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: regexp-builder shows matches, re-search-forward fails?
Date: Thu, 26 Jul 2012 13:23:37 +0200 [thread overview]
Message-ID: <87txwudava.fsf@googlemail.com> (raw)
In-Reply-To: 87y5m6db8r.fsf@googlemail.com
Thorsten Jolitz <tjolitz@googlemail.com> writes:
> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> Check you `point'. Is it already past the matches?
>
> No, I use (goto-char (point-min)) before the re-search-forward. And I
> print out the (current-buffer in the function - its the right one).
>
> BTW its a temp buffer - but that shouldn't matter, right?
More concrete:
,-------------------------
| \\(^# Task: \\)\\(.*$\\)
`-------------------------
does match both tasks in
,----------------------
| # Task: A+B
|
| (+ (read) (read))
| 3 4
| -> 7
|
|
| # Task: Abstract type
`----------------------
in regexp-builder, but
,------------------------------------------------
| (re-search-forward "\\(^# Task: \\)\\(.*$\\)")
`------------------------------------------------
with point at beginning of that buffer gives 'search-failed'.
Thats strange.
(I tried \( and \\\\( for escaping too, but to no avail)
--
cheers,
Thorsten
next prev parent reply other threads:[~2012-07-26 11:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 10:51 regexp-builder shows matches, re-search-forward fails? Thorsten Jolitz
2012-07-26 10:54 ` Jambunathan K
2012-07-26 11:15 ` Thorsten Jolitz
2012-07-26 11:23 ` Thorsten Jolitz [this message]
2012-07-26 13:29 ` Tassilo Horn
2012-07-26 15:51 ` Thorsten Jolitz
2012-07-26 11:25 ` Jambunathan K
2012-07-26 11:35 ` Thorsten Jolitz
2012-07-26 11:36 ` Eric Abrahamsen
2012-07-26 11:17 ` Tassilo Horn
2012-07-26 11:29 ` Thorsten Jolitz
2012-07-26 13:24 ` Tassilo Horn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87txwudava.fsf@googlemail.com \
--to=tjolitz@googlemail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).