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

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -