[BRLTTY] Prompt matching.

Dave Mielke Dave at mielke.cc
Tue Oct 9 05:14:29 EDT 2018


[quoted lines by Aura Kelloniemi on 2018/10/09 at 11:22 +0300]

>But it probably does not help if the pattern contains a dot to match a single
>character, which happens to be a non-ASCII character in the input. E.g. a
>pattern ".> " will not match "λ> ". Am Iright?

Yes, but, if we do some clever parsing, we could translate each dot to
something like:

   (?:[\x00-\x7f]|[\xc0-\xff][\x80-\xbf]*)

I'm wondering, though, if we should just maybe insist on the use of pcre2
because it supports wchar_t which brltty uses. Then we wouldn't have to do any
parsing, character reencoding, etc, and it should just work. Brltty even
already converts the UTF-8 characters in data files to wchar_t for processing.

What I don't know is how pcre2 pattern syntax differs from that of POSIX
extended regular expressions. In case you remind me that it's similar to Perl,
I'll answer that I've never liked Perl so haven't learned much of it. :-)

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke            | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |


More information about the BRLTTY mailing list