From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14679 invoked from network); 3 Mar 2023 19:10:26 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 3 Mar 2023 19:10:26 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 0AED3432A6; Sat, 4 Mar 2023 05:10:25 +1000 (AEST) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by minnie.tuhs.org (Postfix) with ESMTPS id 4712F432A1 for ; Sat, 4 Mar 2023 05:10:20 +1000 (AEST) Received: by mail-lj1-x22a.google.com with SMTP id y14so3387963ljq.4 for ; Fri, 03 Mar 2023 11:10:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pdu9atiF5OZ2BYZMt/107o0xgdmeTC8TsQ9Dea/rbrg=; b=FCJQrZkbRySA2312VpCefhZZ64w3gsVAYecQKj/oQ5NksHdC9mNJAjX8KYq8pV3HV9 02zNgU+SZIvvSKucth4mT4Hchhfo+I6HEpCUmht8EIsuqODM4omFO6gsI2CMxp0mcYT3 2Tkm/bR5fEUl+dMdhaqqfMHubJdyFVGGgFpOBbeZn6wY3wiZHbQZXxufme7VnemkuGz0 iGgc7h9qu/tzxj5agZjgHDF0qEPHvOhtvJS6N+lbxEwrN+VWe2XYQsZ5SXVI+oPyoOri RkHcXoNZLS0A/hETpKrpR2l4zTNJf02COsozunlr++5rau1yPrj0NEFS8YHznuoXZYwr QRZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pdu9atiF5OZ2BYZMt/107o0xgdmeTC8TsQ9Dea/rbrg=; b=U+VzBQ+c9LrUz2hq8E/qiiF1UI/cCWC6pddMegimYxqYNMT6mppdkdNEFmZM6vZB00 yW5HeuYzFlqqqDkp7KJ03NvLUnJQbh7+hri6qZplWzzVjOcr/V+WZDClgeSOkkEPUnVz ynO+Mi8mlWZheXjHjiEJLpIxH+j+Y2Dgj9jpusSDcg5Y6da0aquxzK3o689eiGSsb223 uD6s2E3cJOTl7VMVWkiG7h/p9J1FZswVYyrdfFXDHJx5UztmZNidvMAeCMxIbbCMbh5z YvFDKBMmAOU/aiPp6SxwDpUSM1o/S26jdHtvizgBoCmODljokv9cfBdiOgNgA61lS3rg lq0A== X-Gm-Message-State: AO0yUKXiVTicmcQZupeS0RWuhyeWRY1f8iFZGUG3ZLPih+RNnT483Rjt MQoZAomGtXN+67h/GZrQwmXmMob5eHAq8OsOh0VopB9i X-Google-Smtp-Source: AK7set+DknqpPOfOWPyPIPPWSoigarz4wchn4hPsX7rEPfiU5iDEgOjitfyrJUgKPp8T5HwUWbfZqL1nd2wHnrvT0iE= X-Received: by 2002:a2e:a266:0:b0:293:5140:7548 with SMTP id k6-20020a2ea266000000b0029351407548mr852499ljm.3.1677870617869; Fri, 03 Mar 2023 11:10:17 -0800 (PST) MIME-Version: 1.0 References: <8d1de5c8-1f34-3d37-395d-0f1da7b062ec@spamtrap.tnetconsulting.net> <20230303105928.E88AB215AA@orac.inputplus.co.uk> <20230303173856.B615421D37@orac.inputplus.co.uk> In-Reply-To: <20230303173856.B615421D37@orac.inputplus.co.uk> From: Dan Cross Date: Fri, 3 Mar 2023 14:09:41 -0500 Message-ID: To: Ralph Corderoy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6JSFWZRECB46EXVGV7UXJ32TNNOGJYWT X-Message-ID-Hash: 6JSFWZRECB46EXVGV7UXJ32TNNOGJYWT X-MailFrom: crossd@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: coff@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Re: Requesting thoughts on extended regular expressions in grep. List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, Mar 3, 2023 at 12:39=E2=80=AFPM Ralph Corderoy wrote: > > Dave Horsfall wrote: > > > # Yes, I have a warped sense of humour here. > > > /^[JFMAMJJASOND][aeapauuuecoc][nbrrynlgptvc] [ 0123][0-9] / \ > ... > > in particular, the original is easy to validate by just saying the > > names of the month out loud as one scans the list. > > Some clients pay me to read code and find fault. It's a hard habit to > break. =E2=80=98coc=E2=80=99 smells wrong. :-) > > A bit of vi's :map later... > > Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dcc > > The regexp works, of course, but in this case removing the redundancy > would also fix the =E2=80=98fault=E2=80=99. Ha! Good catch. I'd probably just write it as, `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)` which isn't much longer than the original anyway. - Dan C.