Failure to check trailing "/" on a path resource next to a variable

soo I have a dilemma of checking a trailing “/” next to a variable. Exhibit A: (proxy.pathsuffix JavaRegex “/{variable}(/?)”) and (request.verb = “GET”)

and somehow this error shows up: Error in proxy default. Invalid condition: (proxy.pathsuffix JavaRegex “/{variable}(/?)”) and (request.verb = “GET”) in flow MAINFLOW. Reason: Invalid pattern specified : Illegal repetition near index 0 /{variable}(/?) ^.

so anyone could point me to a great solution? I have done these: https://community.apigee.com/questions/3212/matchi… https://community.apigee.com/questions/4284/how-do…

and no luck

Hi @Hanzel Garcia,

You cannot use a variable syntex {variable} in the conditions check . What you can do is just have request.verb condition and then use a JavaScript policy to read and do regular expression check .

I actually could, I used (proxy.pathsuffix MatchesPath “/{variable}”)

but i couldn’t check the trailing “/” and thats my dilemma

any suggestions on this ?