java - Regular expression to get specific part of request parameter from Log entry? -
i have request parameter in following format
"post /upload/senddata.htm http/1.1"
and want extract resource name in case upload/senddata.htm
any pointers on how in cases request comes
"post //upload/senddata.htm http/1.1"
or
"post ///upload/senddata.htm http/1.1"
i using java
just guess, you're looking for?
post \/+(\w+\/\w+.\w+)
http://rubular.com/r/iulih9ldzs
or maybe this
post \/+(.+)\s
Comments
Post a Comment