Re: [yang-doctors] YANG Tool Requests => regex validator

"Acee Lindem (acee)" <acee@cisco.com> Fri, 28 July 2017 18:24 UTC

Return-Path: <acee@cisco.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 26A0B13206D; Fri, 28 Jul 2017 11:24:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, 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 d3XnI3wEE4LI; Fri, 28 Jul 2017 11:24:13 -0700 (PDT)
Received: from alln-iport-7.cisco.com (alln-iport-7.cisco.com [173.37.142.94]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 69F52131DF7; Fri, 28 Jul 2017 11:24:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7879; q=dns/txt; s=iport; t=1501266252; x=1502475852; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=J1rv5zb5OEf/xtrxVnB267JTyQsJhn8pEGo9vjlxMtQ=; b=g+b3+TBFDBizi79fqHGiA6LuueKFz7EQGRCkckUoV68agszSwWeSbat7 DAYHJDxkapefKbcjqNbntGxGweL429L9TU8/AwI4pw/pphd3Ki2ZPiHoH +TlGLYa4slJEdiXlOIqG49wiRbBwWx4ZbnCFhbILfNQW4af0l5Z3jEptz w=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BQAgDkgHtZ/5RdJa1cGQEBAQEBAQEBAQEBBwEBAQEBgm9rZIEBEwedf4FrkFyHQSiFHwIag1hDFAECAQEBAQEBAWsohRgBAQEBAyNWEAIBBgIRAwECKAMCAgIwFAkIAgQOBYlLZJJTnWSCJos+AQEBAQEBAQEBAQEBAQEBAQEBAQEBGAWDKIhVhQoJgnOCYQWfbQKHTYxXkjyVcQE2IYEKdxWFXxyBZ3aHQiuBBYEOAQEB
X-IronPort-AV: E=Sophos;i="5.40,427,1496102400"; d="scan'208,217";a="463059061"
Received: from rcdn-core-12.cisco.com ([173.37.93.148]) by alln-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jul 2017 18:24:00 +0000
Received: from XCH-RTP-007.cisco.com (xch-rtp-007.cisco.com [64.101.220.147]) by rcdn-core-12.cisco.com (8.14.5/8.14.5) with ESMTP id v6SIO0Sd015285 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 28 Jul 2017 18:24:00 GMT
Received: from xch-rtp-015.cisco.com (64.101.220.155) by XCH-RTP-007.cisco.com (64.101.220.147) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 28 Jul 2017 14:23:59 -0400
Received: from xch-rtp-015.cisco.com ([64.101.220.155]) by XCH-RTP-015.cisco.com ([64.101.220.155]) with mapi id 15.00.1210.000; Fri, 28 Jul 2017 14:23:59 -0400
From: "Acee Lindem (acee)" <acee@cisco.com>
To: "Joe Clarke (jclarke)" <jclarke@cisco.com>
CC: "Pieter Lewyllie (pilewyll)" <pilewyll@cisco.com>, "Benoit Claise (bclaise)" <bclaise@cisco.com>, "Mahesh Jethanandani (mahesh)" <mahesh@cisco.com>, RTG YANG Design Team <rtg-dt-yang-arch@ietf.org>, Ing-Wher Chen <Ing-Wher_Chen@jabil.com>, "Carl Moberg (camoberg)" <camoberg@cisco.com>, YANG Doctors <yang-doctors@ietf.org>, Henrik Levkowetz <henrik@levkowetz.com>, "rkrejci@cesnet.cz" <rkrejci@cesnet.cz>
Thread-Topic: YANG Tool Requests => regex validator
Thread-Index: AQHS/sQbX3YVGh7Gv0CrGwl3/lVlXaJoKFGAgAEhngCAACN7gIAAU8+A///Y4ICAAEWRAP//wCEA
Date: Fri, 28 Jul 2017 18:23:59 +0000
Message-ID: <D5A0F8E3.BA824%acee@cisco.com>
References: <D58522E1.B74DB%acee@cisco.com> <4336925e-a64f-2d73-c67a-a5842de470b1@cisco.com> <a80a1c9b-1056-f6c1-0905-d2f22dab46c8@cisco.com> <D59FBE31.BA3D9%acee@cisco.com> <40AA2897-E297-4A10-AD1E-45EA8A078336@cisco.com> <D5A0CCBC.BA62F%acee@cisco.com> <BB27EB18-AFB5-4092-BB4D-374B620FE2CD@cisco.com> <D5A0F0D8.BA7A4%acee@cisco.com> <015C00CD-30AE-4ED4-AE2E-5188E79F1C25@cisco.com>
In-Reply-To: <015C00CD-30AE-4ED4-AE2E-5188E79F1C25@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.116.152.196]
Content-Type: multipart/alternative; boundary="_000_D5A0F8E3BA824aceeciscocom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/nNhAU573ftyP9ee-yNjHmn0wX4A>
Subject: Re: [yang-doctors] YANG Tool Requests => regex validator
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Jul 2017 18:24:15 -0000


From: "Joe Clarke (jclarke)" <jclarke@cisco.com<mailto:jclarke@cisco.com>>
Date: Friday, July 28, 2017 at 2:12 PM
To: Acee Lindem <acee@cisco.com<mailto:acee@cisco.com>>
Cc: "Pieter Lewyllie (pilewyll)" <pilewyll@cisco.com<mailto:pilewyll@cisco.com>>, "Benoit Claise (bclaise)" <bclaise@cisco.com<mailto:bclaise@cisco.com>>, "Mahesh Jethanandani (mahesh)" <mahesh@cisco.com<mailto:mahesh@cisco.com>>, RTG YANG Design Team <rtg-dt-yang-arch@ietf.org<mailto:rtg-dt-yang-arch@ietf.org>>, Ing-Wher Chen <Ing-Wher_Chen@jabil.com<mailto:Ing-Wher_Chen@jabil.com>>, "Carl Moberg (camoberg)" <camoberg@cisco.com<mailto:camoberg@cisco.com>>, YANG Doctors <yang-doctors@ietf.org<mailto:yang-doctors@ietf.org>>, Henrik Levkowetz <henrik@levkowetz.com<mailto:henrik@levkowetz.com>>, Radek Krejčí <rkrejci@cesnet.cz<mailto:rkrejci@cesnet.cz>>
Subject: Re: YANG Tool Requests => regex validator


https://yangcatalog.org/yangre doesn’t work for me, no matter how I quote
it.

I tried with the inet:ipv4-address pattern and I did get this to work with
W3CGREP but not yangre no matter how I quoted it. For W3CGREP, I had to
remove all the quoting and concatenation. This could be error prone for a
very complex pattern.

Hmmm. This pattern from ietf-inet-types (note: I had the single quotes in the UI):

'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?'

Works for me with this string (only with YANGRE):

192.168.1.1

Nope – exact same pattern and test string fails for me. If I unquote it, it works with W3CGREP.


Thanks,
Acee




Joe