we could go back to perl after all, that would work... or we could use bash regex!
```
 if [[ $FEATURE_BRANCH =~ .*[_-]([0-9]+)$ ]]; then
    ISSUE_NUMBER=${BASH_REMATCH[1]}
elif [[ $FEATURE_BRANCH =~ ^([0-9]+)[_-].* ]]; then
    ISSUE_NUMBER=${BASH_REMATCH[1]}
else
    ISSUE_NUMBER=
fi
```