[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DOC] Incomplete explanation about the regex =~ operator
From: |
Chet Ramey |
Subject: |
Re: [DOC] Incomplete explanation about the regex =~ operator |
Date: |
Wed, 9 Jan 2019 15:37:10 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 1/9/19 2:27 PM, kevin wrote:
> My message was poorly formatted (I lack of experience) and consequently you
> misunderstood it.
> The shell operation is unusual when a regular expression appears inside a
> conditional expression. Indeed, neither the Bash man page or the Bash
> Reference Manual indicates that the shell quotes some characters internally
> (Bash FAQ: http://git.savannah.gnu.org/cgit/bash.git/tree/doc/FAQ#n1927).
"Any part of the pat-
tern may be quoted to force the quoted portion to be matched as
a string."
> Moreover, the explanation in the Bash FAQ is unclear; it lacks examples to
> know when "an interference" occurred.
What is "an interference"?
> Look at the following answer to get an overview of the issue:
> https://stackoverflow.com/a/12696899
That answer is correct: bash uses the C library's regexp library and
only guarantees that POSIX EREs work.
--
``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/
- [DOC] Incomplete explanation about the regex =~ operator, gilaro, 2019/01/08
- Re: [DOC] Incomplete explanation about the regex =~ operator, kevin, 2019/01/09
- Re: [DOC] Incomplete explanation about the regex =~ operator,
Chet Ramey <=
- Re: [DOC] Incomplete explanation about the regex =~ operator, kevin, 2019/01/12
- Fwd: Re: [DOC] Incomplete explanation about the regex =~ operator, kevin, 2019/01/12
- Re: [DOC] Incomplete explanation about the regex =~ operator, Chet Ramey, 2019/01/12
- Re: [DOC] Incomplete explanation about the regex =~ operator, kevin, 2019/01/17
- Re: [DOC] Incomplete explanation about the regex =~ operator, kevin, 2019/01/17
- Re: [DOC] Incomplete explanation about the regex =~ operator, Greg Wooledge, 2019/01/17
- Re: [DOC] Incomplete explanation about the regex =~ operator, Chet Ramey, 2019/01/17