Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14553
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: built-in regex matches wrong character |
| Date | 2018-09-06 10:17 -0400 |
| Message-ID | <mailman.442.1536243444.1284.bug-bash@gnu.org> (permalink) |
| References | <201809051850.w85IoClP001449@mamatb-laptop> <5d3e2655-9b29-563e-a3aa-f96f6563f9fc@redhat.com> |
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/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: built-in regex matches wrong character Chet Ramey <chet.ramey@case.edu> - 2018-09-06 10:17 -0400
csiph-web