[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:23:37 +0200 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) |
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
- 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