Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14553 > unrolled thread

Re: built-in regex matches wrong character

Started byChet Ramey <chet.ramey@case.edu>
First post2018-09-06 10:17 -0400
Last post2018-09-06 10:17 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: built-in regex matches wrong character Chet Ramey <chet.ramey@case.edu> - 2018-09-06 10:17 -0400

#14553 — Re: built-in regex matches wrong character

FromChet Ramey <chet.ramey@case.edu>
Date2018-09-06 10:17 -0400
SubjectRe: built-in regex matches wrong character
Message-ID<mailman.442.1536243444.1284.bug-bash@gnu.org>
On 9/5/18 4:39 PM, Eric Blake wrote:

> Or, you can use bash's 'shopt -s globasciiranges' which is
> supposed to enable Rational Range Interpretation, where even in non-C
> locales, a character range bounded by two ASCII characters takes on the C
> locale definition of only the ASCII characters in that range, rather than
> the locale's definition of whatever other characters might also be
> equivalent (actually, while I know that shopt affects globbing, I don't
> know if it also affects regex matching - but if it doesn't, that's probably
> a bug that should be fixed).

Since bash uses the C library's regexp engine, and most C libraries don't
implement RRI, much less expose it as a flags option available via
regcomp(), there's no reason to expect that globasciiranges would have
any effect on regular expression matching.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web