java - Regular expression to fetch specific part from filepath -


/home/pranay/codebase/trunk/utilities/build/mavenbuild/src/main/resources/templates/server/vmname/blabla.cfg 

i trying fetch 'vmname' file path using this:

(?<=\/build\/mavenbuild\/src\/main\/resources\/templates\/server\\)(.*)(?=\/) 

but regex groups empty. suggestion regarding this?

i thought of idea using look-ahead , look-behind operator, other ideas more welcome.


Comments

Popular posts from this blog

python - Getting ESC characters and non-printables from UDP socket / buffer -

git - TortoiseGit does not show commit log properly -