I'm using shared libraries in groovy. I have this variable which will return : feature/nameofthebranch
def BRANCH = steps.sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()
However I only need the character after the "/" I've tried split and other stuff but doesn't work as I would like to, maybe because I'm clumsy at groovy.
Expected result should be from feature/nameofthebranch to "nameofthebranch"
You can do it like this