OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tosca message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [tosca] FW: TOSCA regex format?


I support PCRE without implicit anchors.

Paul Jordan

On 01/03/2022 21:43, Tal Liron wrote:
Yes, I proposed in the past that we standardize on PCRE, which is the most common syntax and has parsing libraries for most programming languages. And we should not assume it's anchored by default (users may only want to constrain for an existing occurrence pattern rather than the whole string).

Or, if this is too much of a requirement, we can specify that TOSCA "prefers" PCRE where possible, with the same statement about anchors.

On Tue, Mar 1, 2022 at 3:23 PM Chris Lauwers <lauwers@ubicity.com> wrote:

I received the following question from a TOSCA user regarding regular expressions:

 

I donât see any mention of the regular _expression_ syntax which TOSCA is following.

Unfortunately this can vary a bit.

 

As an example:

-          YANG, with its XML heritage, uses XML family syntax

o   A regex is implicitly always anchored start and end (^ and $ are always implied at the ends)

-          JSON Schema uses _javascript_ syntax

o   A regex is never implicitly anchored so you need to add ^ and $ for most regexp on an attribute

 

I think the TOSCA spec has to make a statement on this, either to pick a format or say it is engine dependent (which I donât think is the best choice as this affects portability).

 

I agree that the spec should be very clear about the regex syntax. Any opinions?

 

Thanks,

 

Chris

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]