* Strange re-search-forward
@ 2016-02-24 8:27 Andreas Röhler
2016-02-24 9:08 ` Marcin Borkowski
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2016-02-24 8:27 UTC (permalink / raw)
To: help-gnu-emacs
Evaluating in buffer
(re-search-forward "[ -?]+" nil t)
foo.bar baz
;;;;;;;
matches the period after foo.
Any explanation?
Thanks,
Andreas
GNU Emacs 25.0.90.1 (i686-pc-linux-gnu, GTK+ Version 2.24.25) of 2016-01-31
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Strange re-search-forward
2016-02-24 8:27 Strange re-search-forward Andreas Röhler
@ 2016-02-24 9:08 ` Marcin Borkowski
2016-02-24 9:18 ` Andreas Röhler
0 siblings, 1 reply; 5+ messages in thread
From: Marcin Borkowski @ 2016-02-24 9:08 UTC (permalink / raw)
To: Andreas Röhler; +Cc: help-gnu-emacs
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?
> Thanks,
>
> Andreas
> GNU Emacs 25.0.90.1 (i686-pc-linux-gnu, GTK+ Version 2.24.25) of 2016-01-31
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Strange re-search-forward
2016-02-24 9:08 ` Marcin Borkowski
@ 2016-02-24 9:18 ` Andreas Röhler
2016-02-24 9:52 ` Marcin Borkowski
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2016-02-24 9:18 UTC (permalink / raw)
To: Marcin Borkowski; +Cc: help-gnu-emacs
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.
Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Strange re-search-forward
2016-02-24 9:18 ` Andreas Röhler
@ 2016-02-24 9:52 ` Marcin Borkowski
2016-02-24 16:45 ` Nick Dokos
0 siblings, 1 reply; 5+ messages in thread
From: Marcin Borkowski @ 2016-02-24 9:52 UTC (permalink / raw)
To: Andreas Röhler; +Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Strange re-search-forward
2016-02-24 9:52 ` Marcin Borkowski
@ 2016-02-24 16:45 ` Nick Dokos
0 siblings, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2016-02-24 16:45 UTC (permalink / raw)
To: help-gnu-emacs
Marcin Borkowski <mbork@mbork.pl> writes:
> You're welcome!
>
> Seems you had a problem, and you decided to use regexen... ;-)
Now, you have ... ;-)
--
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-24 16:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 8:27 Strange re-search-forward Andreas Röhler
2016-02-24 9:08 ` Marcin Borkowski
2016-02-24 9:18 ` Andreas Röhler
2016-02-24 9:52 ` Marcin Borkowski
2016-02-24 16:45 ` Nick Dokos
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).