Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14313 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2018-07-10 10:47 -0400 |
| Last post | 2018-07-10 10:47 -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.
Re: Word boundary anchors \< and \> not parsed correctly on the right side of =~ Chet Ramey <chet.ramey@case.edu> - 2018-07-10 10:47 -0400
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2018-07-10 10:47 -0400 |
| Subject | Re: Word boundary anchors \< and \> not parsed correctly on the right side of =~ |
| Message-ID | <mailman.3375.1531234040.1292.bug-bash@gnu.org> |
On 7/10/18 8:52 AM, Ilkka Virta wrote: > On 10.7. 15:27, Greg Wooledge wrote: >> On Mon, Jul 09, 2018 at 10:46:13PM -0300, marcelpaulo@gmail.com wrote: >>> Word boundary anchors \< and \> are not parsed correctly on the right >>> side of a =~ regex match expression. >> >> Bash uses ERE (Extended Regular Expressions) here. There is no \< or \> >> in an ERE. > > Or does it use the system's regex library, whatever that supports? It uses the POSIX regular expression API (regcomp/regexp/regerror/regfree) if the system's libc supports it. Since it uses the POSIX interfaces, it assumes nothing beyond the POSIX definition of EREs. > If '\<' matches just a regular less-than sign (but has a useless > backslash), then surely that should not match? A system's libc can provide extensions. Bash can't assume anything about them. That's why this matches on Linux, but not Mac OS X. -- ``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 top | Article view | gnu.bash.bug
csiph-web