[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange re-search-forward
From: |
Marcin Borkowski |
Subject: |
Re: Strange re-search-forward |
Date: |
Wed, 24 Feb 2016 10:52:38 +0100 |
User-agent: |
mu4e 0.9.13; emacs 25.1.50.3 |
On 2016-02-24, at 10:18, Andreas Röhler <andreas.roehler@easy-emacs.de> wrote:
> On 24.02.2016 10:08, Marcin Borkowski wrote:
>> On 2016-02-24, at 09:27, Andreas Röhler <andreas.roehler@easy-emacs.de>
>> wrote:
>>
>>> Evaluating in buffer
>>>
>>> (re-search-forward "[ -?]+" nil t)
>>>
>>> foo.bar baz
>>>
>>> ;;;;;;;
>>>
>>> matches the period after foo.
>>>
>>> Any explanation?
>> space: ascii 32
>> period: ascii 46
>> question mark: ascii 63
>>
>> 46 ∈ {32,...,63}
>>
>> so what's wrong?
>>
>
> Ohh, shame on me.
>
> Minus must come first if meant literally.
Or last, or right after a range.
> Thanks!
You're welcome!
Seems you had a problem, and you decided to use regexen... ;-)
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University