octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57107] regexp functions fail on ISO-8859-1 in


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #57107] regexp functions fail on ISO-8859-1 input
Date: Sun, 18 Jun 2023 15:30:05 -0400 (EDT)

Follow-up Comment #38, bug #57107 (project octave):

IIUC, your use case is exactly the type for which the proposed workaround
should be working. You could use something like the following:

first_non_ascii_idx = max([find(buffer>2^7, 1, 'first'), 1]);
regexp(buffer(1:first_non_ascii_idx-1), '^\s*(http|https|ftp|file)://');


That should be working in Octave and in Matlab. And maybe also speed up the
regexp if `buffer` can be very large...

Could you please clarify or show an example for which the above approach
doesn't work?




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57107>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]