[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scan of regexps in Emacs (March 17)
From: |
Stefan Monnier |
Subject: |
Re: Scan of regexps in Emacs (March 17) |
Date: |
Tue, 02 Apr 2019 12:58:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> (string-match "\xff" "\xff") => 0
> (string-match "[\xff]" "\xff") => 0
> (string-match "\xffé?" "\xff") => nil
> (string-match "[\xff]é?" "\xff") => 0
> (string-match "\xff" "\xffé") => 0
> (string-match "[\xff]" "\xffé") => nil
> (string-match "\xffé?" "\xffé") => 0
> (string-match "[\xff]é?" "\xffé") => nil
Check (multibyte-string-p "...") on those strings, to see some of the
reasons why. IIRC the treatment of those escape sequences to determine
unibyte/multibyte strings is pretty tricky (last time I looked at it,
I found its behavior to be undesirable, but I believe it has slightly
changed since and I can't remember what were the problems I bumped
into).
Stefan
- Re: Scan of regexps in Emacs (March 17), Paul Eggert, 2019/04/02
- Re: Scan of regexps in Emacs (March 17), Mattias Engdegård, 2019/04/02
- Re: Scan of regexps in Emacs (March 17), Noam Postavsky, 2019/04/02
- Re: Scan of regexps in Emacs (March 17),
Stefan Monnier <=
- Re: Scan of regexps in Emacs (March 17), Paul Eggert, 2019/04/02
- Re: Scan of regexps in Emacs (March 17), Mattias Engdegård, 2019/04/06
- Re: Scan of regexps in Emacs (March 17), Michael Albinus, 2019/04/07
- Re: Scan of regexps in Emacs (March 17), Paul Eggert, 2019/04/07
- Re: Scan of regexps in Emacs (March 17), Mattias Engdegård, 2019/04/07
- Re: Scan of regexps in Emacs (March 17), Paul Eggert, 2019/04/07