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


Groups > gnu.bash.bug > #15418

Documentation Bug Concerning Regular Expressions?

Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From "Hults, Josh" <JHults@Serigraph.com>
Newsgroups gnu.bash.bug
Subject Documentation Bug Concerning Regular Expressions?
Date Mon, 23 Sep 2019 16:56:47 +0000
Lines 42
Approved bug-bash@gnu.org
Message-ID <mailman.916.1569259809.2190.bug-bash@gnu.org> (permalink)
References <MWHPR2001MB1759D1C99BE7A8EEC24C6AA2C8850@MWHPR2001MB1759.namprd20.prod.outlook.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
X-Trace usenet.stanford.edu 1569259809 1752 209.51.188.17 (23 Sep 2019 17:30:09 GMT)
X-Complaints-To action@cs.stanford.edu
To "bug-bash@gnu.org" <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
ARC-Seal i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kncduOrxCmDx79kPwCC5fhnYf8qO7TqVy6KBGMpNcp8Du66Mm0wjsrtWfZ2+/dmFEArq5MyyLI1J5sP3wXJmqq3nCx/0anapnp+MD7/7k/Kq3XuIbPZrIOQK6MLfHa/3Fhn9+uJv6KpB51/kd3OwHpcZMEAOSS941oYz+MaHcy898j1ijNmW2yEhfkatf7AuqOF+/DvQG1c0YfAsx5r1vkMQjri0IvuAi8da6uOXQVOF4QQwuT4ub0jYei1pz63t/CSuonEli3ZM2Pxa5YPAvnhAPJbzZmST+c00fZFamrQVKtfxjSrbP2VRh5H7/fFJ5omRLAfmxklXCASwyr4ajQ==
ARC-Message-Signature i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f+twua2oJvqVgKoKjvR35hT+zfamFV3pZNMPtipZ9Z4=; b=BfMDaUS7BB5rv3j4EFYYWCVkJ0gPzM8XLRwSX9mHPUfnHEpWvSh9+UyinVLacK3DFxNzvw3MU51YQWcqqhTDyE5tM7IQkLtj3BGsjTXz18kLDO6p57aAy4lu6Tc7jQv/vIzMH/w9oaoBBG9U4JjDy/VXCb90M4jSg1LWLYVhFSHLU32UDZA3pU1MUZGgUDhqlmN9I8UqrseiePyVBvqlVTQ2BqLNx9sWO/CP3cczj1bnLlVDFzn1DfFJ/7YXNuf9FsclPwOnx16GcdO1IinEzyKkPYnaepUtEjY4gOd2cIKs5CCcJ88LtN5f9qefhRoBMXMq2VD5Uc5xZsZeTlImOw==
ARC-Authentication-Results i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=serigraph.com; dmarc=pass action=none header.from=serigraph.com; dkim=pass header.d=serigraph.com; arc=none
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=serigraph.onmicrosoft.com; s=selector2-serigraph-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f+twua2oJvqVgKoKjvR35hT+zfamFV3pZNMPtipZ9Z4=; b=OoQ08jtkNye5EzLcjfbCyk1l5BHFyxfcmIDr4yOs0KSKNm1/AIdcJXCzV7QClnKkFAwoooVsNa+1YVzjDfs2p9KhqGm9LcJvpFJZZyr3LRtCR3LRYgTRqGs8XgBKH6P2PpXC6ygtdn6gCMBPTz7Hn0X75//zg3SRTmCawwywvEI=
Thread-Topic Documentation Bug Concerning Regular Expressions?
Thread-Index AdVyLEC1hi0QDPqmRdOsPyoji4Tsuw==
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
authentication-results spf=none (sender IP is ) smtp.mailfrom=JHults@Serigraph.com;
x-originating-ip [12.48.140.82]
x-ms-publictraffictype Email
x-ms-office365-filtering-correlation-id 669db183-7f87-4331-46a9-08d74047059f
x-microsoft-antispam BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:MWHPR2001MB1038;
x-ms-traffictypediagnostic MWHPR2001MB1038:
x-microsoft-antispam-prvs <MWHPR2001MB103807037E77B828C8618B9CC8850@MWHPR2001MB1038.namprd20.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers OLM:9508;
x-forefront-prvs 0169092318
x-forefront-antispam-report SFV:NSPM; SFS:(10019020)(4636009)(346002)(396003)(136003)(376002)(366004)(39850400004)(199004)(189003)(51744003)(14454004)(2501003)(476003)(5024004)(14444005)(486006)(966005)(25786009)(256004)(8936002)(86362001)(8676002)(6436002)(5660300002)(64756008)(66556008)(66476007)(66946007)(7696005)(52536014)(66446008)(76116006)(478600001)(316002)(66574012)(99286004)(66066001)(55016002)(33656002)(102836004)(74316002)(81156014)(7736002)(2351001)(6916009)(186003)(26005)(81166006)(6506007)(3846002)(2906002)(80792005)(5640700003)(6116002)(71190400001)(9686003)(790700001)(236005)(6306002)(54896002)(71200400001); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR2001MB1038; H:MWHPR2001MB1759.namprd20.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf None (protection.outlook.com: Serigraph.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck 1
x-microsoft-antispam-message-info GvHRFrX+A8S1Xu6CilXUN81QQKp1+109lZrypC0WHXOaD0DF0G7wuOo2Ma8YAly9MvAWuk62VLN2hgwdHjQ4eejoWnB8RXSu52Fkr9MTBrqQQW2EyISWm2hXFa66ox5CKuDnUc3UBU/FALHNO0PzL8osH/nS/pP5AgOF+9pD92TITnWgVHnoDanyhIMK/EuuzylkBojIk706C83nIeb4O7uuibFePwIJWjyr9qbbO2nxsEZFG7fBcaxBEJqz3QhoTxspARGXoorNTAObX+aROvSp1F8GZHH97PmAY0dvRLkqsIWtJK8JcPEX+vHRxqgDLxc6aa0wVJeHbpAVC9PmZAI9bkTI+XQVgrg0d76EzhAqk1bmUz51E7luTubFXwG6GxkrrF9qkVrKhzPEd0ERBs6IonOa1e+QuS3j0ErPMsU=
x-ms-exchange-transport-forked True
X-OriginatorOrg serigraph.com
X-MS-Exchange-CrossTenant-Network-Message-Id 669db183-7f87-4331-46a9-08d74047059f
X-MS-Exchange-CrossTenant-originalarrivaltime 23 Sep 2019 16:56:47.4655 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader Hosted
X-MS-Exchange-CrossTenant-id 27b83c7c-bf7d-4d98-b5d8-0f81a5b38fd8
X-MS-Exchange-CrossTenant-mailboxtype HOSTED
X-MS-Exchange-CrossTenant-userprincipalname VI6/wPEPDX4qNhIeobAqPx2ZlhghZFFwRjebJit9z9lRETChubdPX+heYrbmn8lSgPRioNcuo9mqV6dNTNIzxw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped MWHPR2001MB1038
X-detected-operating-system by eggs.gnu.org: Windows 7 or 8 [fuzzy]
X-Received-From 40.107.76.99
X-Mailman-Approved-At Mon, 23 Sep 2019 13:30:06 -0400
X-Content-Filtered-By Mailman/MimeDel 2.1.23
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <MWHPR2001MB1759D1C99BE7A8EEC24C6AA2C8850@MWHPR2001MB1759.namprd20.prod.outlook.com>
Xref csiph.com gnu.bash.bug:15418

Show key headers only | View raw


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
jhults@serigraph.com<mailto:jhults@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.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Documentation Bug Concerning Regular Expressions? "Hults, Josh" <JHults@Serigraph.com> - 2019-09-23 16:56 +0000

csiph-web