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

Robert Wilton <rwilton@cisco.com> Mon, 04 September 2017 14:37 UTC

Return-Path: <rwilton@cisco.com>
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 4AF4F132AA5 for <netmod@ietfa.amsl.com>; Mon, 4 Sep 2017 07:37:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 ML54zObf5URK for <netmod@ietfa.amsl.com>; Mon, 4 Sep 2017 07:37:42 -0700 (PDT)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EFE7C1321AE for <netmod@ietf.org>; Mon, 4 Sep 2017 07:37:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=955; q=dns/txt; s=iport; t=1504535862; x=1505745462; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=j3bG9Uxtj7aFL5gyigU8yfPGnoODVWvm8PeMc0k7gB8=; b=Xq/c+BOZZ84afw4FGqcKA6Uq4DKkHYY4zbMWuAGFpp1hFgDDW9+m1dJ2 MSFKj9eBVYlWCwWOnHkt84GWf9Fo2230az3o4rfGmYWGsDQVAV6+4WB8f OLsEMbRQUK9CtRaEcYaovpx2W8nvhjMVicOAVrSz5VE922UE79Cc3x1JN k=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CFAgBgZK1Z/xbLJq1dGQEBAQEBAQEBAQEBBwEBAQEBhD6BFYN3ixSQfCKYOgojhRsChF8UAQIBAQEBAQEBayiFGQEFIw8BBUEQCQIOCgICJgICVwYNCAEBii0QlnydZoIni1IBAQEBAQEBAQEBAQEBAQEBAQEBGgWBDYIdg1CBYysLgnKICIJhAQSgdIdbjHaLVIcdjVeHKQMGBQIZgTk2IYENMiEIHBWHZT82AQGLFwEBAQ
X-IronPort-AV: E=Sophos;i="5.41,475,1498521600"; d="scan'208";a="654391836"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2017 14:37:40 +0000
Received: from [10.63.23.66] (dhcp-ensft1-uk-vla370-10-63-23-66.cisco.com [10.63.23.66]) by aer-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id v84EbdU6014039; Mon, 4 Sep 2017 14:37:39 GMT
To: Carsten Bormann <cabo@tzi.org>
Cc: Alex Campbell <Alex.Campbell@Aviatnet.com>, "netmod@ietf.org" <netmod@ietf.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> <90927C99-0BE9-488D-AB96-ACEBBE3F0F14@tzi.org>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <aa4b6c31-3916-3769-9275-e92cfa0f5c75@cisco.com>
Date: Mon, 04 Sep 2017 15:37:39 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <90927C99-0BE9-488D-AB96-ACEBBE3F0F14@tzi.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/NfOrejxEiDrvr1_31qJM2X42bqA>
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 14:37:44 -0000

Hi Carsten,

I'm slightly lost :-)

Don't you have the same issue for CDDL in that the specification 
supports the full syntax from PCRE (which appears to be one of the much 
larger and more complex regex language specifications) which will force 
implementations to use a PCRE compatible implementation?

I think that the world needs a minimal common regex language ... but 
presumably that is just walking into the XKCD trap: 
https://xkcd.com/927/ ;-)

Rob


On 04/09/2017 12:18, Carsten Bormann wrote:
> 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
>
> .
>