Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Negative Lookahead pattern is not supporting in OAS policy

Hi Team,

The below issue is in hybrid (1.9.3).

Proxy is giving deployment error for below pattern which exists in OAS policy resource file (openapispec). Saying that unsupported Perl Syntax : `(?!`

 

^(?![\s\S]*<script\b|[\s\S]*javascript\b|[\s\S]*[<>\[\]{};\\|!])[\s\S]*$

 

It is giving error for negative lookahead (?!) pattern. So I tried by giving alternative negative lookahead like below

 

^(?=[\s\S]*$)(?![\s\S]*<script\b)(?![\s\S]*javascript\b)(?![\s\S]*[<>\[\]{};\\|!])[\s\S]*$

 

But still it is giving error.  Saying that unsupported Perl Syntax : `(?=`

And I tried the same patterns in apigee edge where it is deploying without any issues.

May I know why its not working in hybrid. If its a bug pls let me know in which version will this be resolved.


  

 

0 6 647
6 REPLIES 6
Top Solution Authors