From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36183 invoked by alias); 2 Oct 2019 17:39:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 36174 invoked by uid 89); 2 Oct 2019 17:39:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Oct 2019 17:39:10 +0000 Received: from [172.16.0.120] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A791D1E08E; Wed, 2 Oct 2019 13:39:08 -0400 (EDT) Subject: Re: New ARI warning Wed Oct 2 01:56:22 UTC 2019 To: Tom Tromey Cc: GDB Administrator , gdb-patches@sourceware.org References: <20191002015622.GA57488@sourceware.org> <875zl7yvhy.fsf@tromey.com> <87zhijt5i5.fsf@tromey.com> From: Simon Marchi Message-ID: <9eebf8fb-43f3-1c13-e557-a71c706b2b73@simark.ca> Date: Wed, 02 Oct 2019 17:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <87zhijt5i5.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-10/txt/msg00076.txt.bz2 On 2019-10-02 1:35 p.m., Tom Tromey wrote: > I believe that in most regexp syntax, a "]" doesn't need to be quoted in > a character class, provided it is either the first character (like > "[]...]") or comes immediately after the "^" (like "[^]...]"). > > The gawk manual mentions this, though it does also recommend using > backslash, so maybe I should just do that. > > (info "(gawk) Bracket Expressions") > > To include one of the characters '\', ']', '-', or '^' in a bracket > expression, put a '\' in front of it. For example: > > [d\]] > > matches either 'd' or ']'. Additionally, if you place ']' right after > the opening '[', the closing bracket is treated as one of the characters > to be matched. Well, as long as the regex does what it is meant to do, I am fine with it. I just thought that it would be nice to have a small comment that explains what it does, prevent using %p to print raw pointers, but allow the gdb extensions. Simon