Hi,
I was using a regex pattern to break down the context path for a servlet.
/{1,2}([^/{1,2}]+)
This works great for simple paths like /User/folder1/folder2/folder3/.
In more real world scenario however there seems to be a problem if one of the folder names contains a dotted version number, such as: /User/username/Library/Tomcat/apache-tomcat-6.0.24.
In this case Matcher.group(1) will return apache-tomcat-6.0. instead of apache-tomcat-6.0.24. I don't know why that happens; I believe it should not.
Any insights?
Edit
This works:
/{1,2}([^/]+)