Re: [netmod] Potential additions to rfc6087bis: RegEx guidelines

Carsten Bormann <cabo@tzi.org> Mon, 04 September 2017 11:18 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 16DA513292B for <netmod@ietfa.amsl.com>; Mon, 4 Sep 2017 04:18:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZoVkAm21kG_v for <netmod@ietfa.amsl.com>; Mon, 4 Sep 2017 04:18:23 -0700 (PDT)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A8FB91320CF for <netmod@ietf.org>; Mon, 4 Sep 2017 04:18:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::b]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id v84BI921007797; Mon, 4 Sep 2017 13:18:09 +0200 (CEST)
Received: from [192.168.217.124] (p5DC7FC78.dip0.t-ipconnect.de [93.199.252.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 3xm6lj2zYpzDLpn; Mon, 4 Sep 2017 13:18:09 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <e92d63dc-012c-c37f-e94e-8013def8c736@cisco.com>
Date: Mon, 04 Sep 2017 13:18:08 +0200
Cc: Alex Campbell <Alex.Campbell@Aviatnet.com>, "netmod@ietf.org" <netmod@ietf.org>
X-Mao-Original-Outgoing-Id: 526216687.990243-512ad12e7549ced14f7f233fc7c38eea
Content-Transfer-Encoding: quoted-printable
Message-Id: <90927C99-0BE9-488D-AB96-ACEBBE3F0F14@tzi.org>
References: <c8de6140-af50-0a4b-a479-b011a8dfbbe7@cisco.com> <CABCOCHRNt3Tkxy8Ffz3JGgPe-rQYwZ3MTLmD43OQi4P6tZQJmg@mail.gmail.com> <f7151a6b-9deb-52ad-62a9-78b29a552540@cisco.com> <20170830102902.2n5q6rgq2x2dxfq2@elstar.local> <e8482a9c-cba3-28e2-9ffa-ec5eb5c1c0a4@cisco.com> <20170830123156.cssrg5kklpo67fie@elstar.local> <CABCOCHTtN611FO2ov2kTLtZx-Q3=tzgH7Xk9uGvFUD1WuyMZyw@mail.gmail.com> <b13c5e9a-e9f9-96e9-8823-0402fb74af09@cisco.com> <1504223854014.55228@Aviatnet.com> <847e5bf9-7b3d-9ff8-9954-970f32a2094c@cisco.com> <20170902073342.xoziwor4tdr5bipw@elstar.local> <e92d63dc-012c-c37f-e94e-8013def8c736@cisco.com>
To: Robert Wilton <rwilton@cisco.com>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/DuT8PopmQPOKyx7XGXNO_MSH4L8>
Subject: Re: [netmod] Potential additions to rfc6087bis: RegEx guidelines
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Sep 2017 11:18:25 -0000

I’m not going to say we have solved the underlying problem (too many flavors of regular expression) completely for CDDL, but in CDDL we are using PCRE with anchors then added:

https://tools.ietf.org/html/draft-ietf-cbor-cddl-00#section-3.8.3

(And here is the implementation:
      h[k] = Regexp.new("\\A#{k}\\z")
That should not be too hard to replicate in any language :-)

Grüße, Carsten