Hello Bash Maintainers, In the currently posted version of the Bash documentation, there is a section regarding Conditional Constructs (3.2.4.2, https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Conditional-Constructs). Within that section is a portion discussing the [[ ... ]] operator, and within that portion is a discussion of the "=~" regex operator.
The example given of a regex pattern is: [[ $line =~ [[:space:]]*?(a)b ]]. (This example is referenced twice) I believe in the question mark in the regular expression is in the wrong place, based on the . I believe it should be after the parenthesized "a". Putting it before the parentheses is more akin to the syntax used for extended file globbing with the extglob option, such as !(...), @(...), etc. In true regular expressions, like after =~, the repetition operator always goes after the sub expression. Thank you for your time and effort into the shell itself, and the corresponding manual. They've both been instrumental in my job as a systems administrator. If you'd like to discuss my suggestion further, or any portion of the manual, don't hesitate to reach out. Josh Hults Systems Administrator jhu...@serigraph.com<mailto:jhu...@serigraph.com> 262.335.7675 This email and any attachments may contain information that is confidential, privileged and/or attorney work product and proprietary of Serigraph Inc. or Carvel Print Serigraph Inc. Distribution only allowed by expressed authority of Serigraph Inc or Carvel Print Serigraph Inc. If you have received this e-mail in error, please notify the sender immediately and delete the original. Este correo y sus adjuntos pueden contener informaci?n confidencial, privilegiada y/o consideradas como secreto industrial; propiedad de Serigraph Inc. o Carvel Print Serigraph Inc. La distribuci?n de este contenido deber? estar autorizada expresamente por Serigraph Inc. o Carvel Print Serigraph Inc. Si usted recibe este correo por error o no es el receptor, por favor notifique inmediatamente al remitente y borre el original.