How to indicate one or more match in url pattern?
Asked Answered
U

2

0

"/*" will match zero or more characters. I want to serve request if there is a one or more characters proceeding the "/" character.

Note: I am using Guice's Servlet Module to configure the request.

Thanks!

Unciform answered 16/9, 2011 at 16:41 Comment(1)
I don't think "proceeding" is the word you want. Do you mean "following"? "Preceding"? Trying to understand your question.Speculate
I
1

I think you can just do this, assuming you mean that you want to matching anything with a / and 1 or more characters after it (so /foo and /a but not /).

serveRegex("/.+")
Illustrator answered 16/9, 2011 at 16:48 Comment(0)
F
0

in general regex:

/+

dont know if it works here tough ..?

http://code.google.com/p/google-guice/wiki/ServletRegexKeyMapping

Freeforall answered 16/9, 2011 at 16:46 Comment(2)
This will only match a string of / characters.Speculate
well, then you probably have to add an . like mentioned by Colin or (.) like in the link stated (before the +-sign)Freeforall

© 2022 - 2024 — McMap. All rights reserved.