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

Using Extract Variable Policy, can we extract the substring of a string?

I have implemented with the JS, want to know if we can implement using the policies

Solved Solved
1 4 1,056
2 ACCEPTED SOLUTIONS

@Amar N ,

Yes, It's possible. It does support substring extraction from a string. For more details reger policy documentation here.

For Example, below pattern will extract substring from queryparam. If queryparam value is "DBN001" then code extracted will be 001.

   <QueryParam name="code">
      <Pattern ignoreCase="true">DBN{dbncode}</Pattern>
   </QueryParam>

Keep us posted if you have any queries.

View solution in original post

Yes it is possible only when the sub string is varying and the main string except supstring is constant.

View solution in original post

4 REPLIES 4