Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Guebitz Roland Newsgroups: gnu.bash.bug Subject: Error in the manual regarding the '=~' operator Date: Thu, 9 Apr 2020 11:19:18 +0000 Lines: 46 Approved: bug-bash@gnu.org Message-ID: References: <3eb0ef0951a447be9c1a3cbaca534486@cardcenter.ch> 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 1586438131 12925 209.51.188.17 (9 Apr 2020 13:15:31 GMT) X-Complaints-To: action@cs.stanford.edu To: "'bug-bash@gnu.org'" Envelope-to: bug-bash@gnu.org Authentication-Results: ucc-mx001-ch-zur-2; dkim=none Thread-Topic: Error in the manual regarding the '=~' operator Thread-Index: AdYOYA9kkr8eFyrNRmqNS5PZW/zi/A== Accept-Language: de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: classification: Verschl?sselung aus _si_props_: _SIProp12DataClass%2b69cc226f-2bbb-4a3b-861d-be30ed4d8786=v%3d1.2%3eI%3d69cc226f-2bbb-4a3b-861d-be30ed4d8786%26N%3dVerschl%25c3%25bcsselung%2baus%26V%3d1.3%26U%3dSystem%26D%3dSystem%26A%3dAssociated%26H%3dFalse _iqpdocumentid: 547d286e-bc0f-49d7-bbca-f1465f1b4da6 x-originating-ip: [172.28.201.210] x-moderation-data: 09.04.2020 13:19:42 x-c2processedorg: 195cab11-6846-42fa-ae00-49d712bb6185 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.81.140.122 X-Mailman-Approved-At: Thu, 09 Apr 2020 09:15:30 -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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <3eb0ef0951a447be9c1a3cbaca534486@cardcenter.ch> Xref: csiph.com gnu.bash.bug:16112 Hello, in the section https://www.gnu.org/software/bash/manual/bash.html#Conditional-Constructs you have this example: [[ $line =3D~ [[:space:]]*?(a)b ]] The expression ?() is not part of the Posix ERE. It is part of bash pattern= matching: https://www.gnu.org/software/bash/manual/bash.html#Pattern-Match= ing Consider this example, which will not match: line=3D"aaab" echo $line if [[ $line =3D~ '?(a)b' ]]; then echo Match echo ${BASH_REMATCH[0]} echo ${BASH_REMATCH[1]} else echo No match fi Kind regards, Roland Based on previous e-mail correspondence with you and/or an agreement reache= d with you, we consider ourselves authorized to contact you via unsecured e= -mail. Warning: (a) E-mails can involve SUBSTANTIAL RISKS, e.g. lack of confidentiality, po= tential manipulation of contents and/or sender's address, incorrect recipie= nt (misdirection), viruses etc. We assume no responsibility for any loss or= damage resulting from the use of e-mails. We recommend in particular that = you do NOT SEND ANY SENSITIVE INFORMATION, that you do not include details = of the previous message in any reply, and that you enter e-mail address(es)= manually every time you write an e-mail. (b) As a matter of principle, we do NOT accept any ORDERS, revocations of o= rders or authorizations, blocking of credit cards, etc., sent by e-mail. Sh= ould such an e-mail nevertheless be received, we are not obliged to act on = or respond to the e-mail. Please notify us immediately if you received this e-mail by mistake or if y= ou do not wish to receive any further e-mail correspondence. If you have re= ceived this e-mail by mistake, please completely delete it (and any attachm= ents) and do not forward it or inform any other person of its contents.