Reputation: 1572
I have request parameter in the following format
"POST /upload/sendData.htm HTTP/1.1"
And I want to extract resource name from that which in this case is upload/sendData.htm
Any pointers on how to do this as in some cases the request comes like
"POST //upload/sendData.htm HTTP/1.1"
or
"POST ///upload/sendData.htm HTTP/1.1"
I am using Java
Upvotes: 0
Views: 94
Reputation: 31204
Just a guess, but is this what you're looking for?
POST \/+(\w+\/\w+.\w+)
http://rubular.com/r/IUlIH9LDzS
or maybe this
POST \/+(.+)\s
http://rubular.com/r/sdw51Ek1Wi
Upvotes: 2