I need to remove the jsessionid from the given URL .The jessionid is not in the query part
for example i have URL like
http://example.com/index.do;jsessionid=XXXXXXXXXXXXXXX?username=example
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
This will work whether or not your url has any parameters, eg, it will work for both of these:
http://example.com/index.do;jsessionid=XXXXXXXXXXXXXXXhttp://example.com/index.do;jsessionid=XXXXXXXXXXXXXXX?username=exampleIt employs a regex “look ahead” to capture up to (but not including) either a
?or end of input.