At the moment, the branch when condition does support GLOB, but no REGEXP patterns. Let's standardize the branch condition format as done with the tag condition.
when {
branch "release-*"
}
when {
branch pattern: "release-*", comparator: "GLOB"
}
when {
branch pattern: "release-\\d+", comparator: "REGEXP"
}