Skip to main content

How to write regex for resource in Client ID enforcement policy for a resource like below.

 

emp/{empid}/salary

2 answers
  1. Feb 24, 12:57 PM

    Ans:          ^/emp/[^/]+/salary$ 

     

    here detailed explanation on each special regular expression: 

     

    ^ = Start of path 

     

    /emp/ = Fixed part 

     

    [^/]+ = Matches any value for empid (anything except /) 

     

    /salary = Fixed part 

     

    $ = End of path

0/9000