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

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -