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


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

Re: Incorrect example for `[[` command.

Started byChet Ramey <chet.ramey@case.edu>
First post2019-09-21 17:15 -0400
Last post2019-09-21 17:15 -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: Incorrect example for `[[` command. Chet Ramey <chet.ramey@case.edu> - 2019-09-21 17:15 -0400

#15398 — Re: Incorrect example for `[[` command.

FromChet Ramey <chet.ramey@case.edu>
Date2019-09-21 17:15 -0400
SubjectRe: Incorrect example for `[[` command.
Message-ID<mailman.747.1569100529.2190.bug-bash@gnu.org>
On 9/20/19 8:12 PM, hk wrote:

> What is wrong is the description `zero or one instances of 'a''. But if we
> correct the right hand side word to beĀ  `[[:space:]]*(a)?b' that it does
> match what the description says.(the parenthese around `a' could be omitted).

Yeah, that's the typo.

> I was also wrong saying it was a pattern instead of a regular expression.
> It is syntatically correct as a regular expression.

That's true. According to the POSIX ERE definition, the `?' is a special
ERE character in an invalid position (it's only special after a specifier
that matches a single character, not after a separate specifier that
matches multiple characters), so it matches itself.

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