> -----Original Message-----
> From: Juergen Schoenwaelder [mailto:[email protected]]
> Sent: Friday, August 25, 2017 8:53 AM
> To: Xufeng Liu <[email protected]>
> Cc: Per Hedeland <[email protected]>; Ladislav Lhotka <[email protected]>;
> '[email protected]' <[email protected]>
> Subject: Re: [netmod] Potential additions to rfc6087bis: RegEx guidelines
> 
> On Fri, Aug 25, 2017 at 12:40:18PM +0000, Xufeng Liu wrote:
> >
> > > I did not see a proposed change to the standard YANG specification
> > > regarding the regexp flavor, only a proposal that module authors
> > > SHOULD show consideration for implementations that don't comply with
> > > the standard.
> > >
> 
> > [Xufeng] This is the point.
> 
> Perhaps this did not come out properly.
> 
> Anyway, why would I as a YANG author have to replace \d with [0..9] so that
> implementations that can't handle \d are happy? An implementation can easily
> do this substitution itself before passing the pattern to the regex engine it
> prefers to use. (I think this is what libyang is actually doing, I think it 
> uses pcre
> internally.)
> 
> YANG 1.0 and 1.1 are pretty clear which pattern syntax they use.
> Implementations should try to support that.

[Xufeng] [0..9] is still compliant with the XSD pattern specified by YANG 1.0 
and 1.1. Using [0..9] instead of [\d] will make the implementations with native 
POSIX RegEx easier without the need for a tool to inspect every element of the 
RegEx pattern.

> 
> /js
> 
> --
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to