[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Trouble in understanding the behavior of search-backward-regexp
From: |
Alain Cochard |
Subject: |
Trouble in understanding the behavior of search-backward-regexp |
Date: |
Mon, 07 Sep 2009 18:03:47 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hello. The trouble concerns the regular expression
[[:blank:]]+
for which I read that it matches any sequence of spaces and tabs.
Let me start with search-forward-regexp, with which I have no problem.
Let us say I have the following sentence:
foo bar
with spaces and tabs between the two words
If I put the cursor at the beginning and I use 'search-forward-regexp'
with this [[:blank:]]+, I end up with the cursor right on the 'b',
which is what I expect.
Now, if I put the cursor at the end of that sentence and use
search-backward-regexp, again with [[:blank:]]+, I would expect to end
up on the second 'o' of 'foo'. Instead, I end up somewhere between
the two words, which is very mysterious to me (I have tried with
several combinations of emacs-version/distributions/hardware).
Thanks in advance for any tip.
Alain
- Trouble in understanding the behavior of search-backward-regexp,
Alain Cochard <=