0

My main goal is that I have this expression in a uri-rewriter:

<request uri="^/(.+)/name=(.+)$" endpoint="/endpoint.xqy">
   <uri-param name="level">$1</uri-param>
   <uri-param name="name">$2</uri-param>
</request>

which reads uris of the form .../level/name= __

but I want to replace the slash before the name with a question mark to read the following form .../level?name= __

I want to treat the question mark as literal in the uri. I saw that special characters in a regex can be escaped with a " \ "

But it does not work on question marks or ampersand ... It works on + or . Which is weird. Can anyone please help?

1 Answer 1

-2

The ? character can be surely escaped using \ in RegEx but I am not sure about the MarkLogic. Maybe because it is defining uri endpoints, it is not taking uri parameters into consideration.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.