Have a repo with branches like /release/1.2.3, /release/2.3.4, /release/test, /release/test1

In Declarative pipeline, at checkout GitSCM, trying to checkout only specific branches with regex pattern.

```
branches: [[name: "origin/release/\d{*}.\d{*}.\d{*}"]]

```

ex: origin/release/2.3.4 or other branches with matched pattern.

But git checkout is occurring even if pattern not matched.