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

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

angular - DownloadURL return null in below code -