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?


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]