Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14314 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2018-07-10 10:50 -0400 |
| Last post | 2018-07-10 10:50 -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:50 -0400
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2018-07-10 10:50 -0400 |
| Subject | Re: Word boundary anchors \< and \> not parsed correctly on the right side of =~ |
| Message-ID | <mailman.3376.1531234202.1292.bug-bash@gnu.org> |
On 7/10/18 9:02 AM, Paulo Marcel Coelho Aragão wrote: > On Tue, Jul 10, 2018 at 08:27:18AM -0400, Greg Wooledge wrote: >> Bash uses ERE (Extended Regular Expressions) here. There is no \< or \> >> in an ERE. >> >> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04 > > Thanks for the reference. The document lists only ^ and $ as anchors. However, this indicates to me that bash recognizes \< \> as word anchors: No, it doesn't. It indicates that the system's POSIX regular expression implementation has extensions. > Empirically all this demonstrates: > > 1. bash recognizes \< \> \b as word anchors No, it doesn't. > 2. bash doesn't evaluate them correctly when used as literals Yes, it does. It may not conform to your assumptions. > 3. bash evaluates them correctly when used with parameter expansion No. It passes them to the system's POSIX regexp library function, which understands them as an extension. -- ``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