Group variable attributes in a linux path effectively with regex. Here the workspace can be changed and the modulename can change. Case scenario found trying to identyfy the modulename and workspace directory in Jenkins build.