RegEx using capture group variable

Hi I would like to know if we can use capture group from RegEx used by rules for a workflow.

For example: try to use the capture group to check the major version using $1 as shown below

myjob:
   rules:
     -if: $VERSION =~ /^(\d+)\./ && $1 >= 42

I cannot find documentation or example showing such an option to use the capture group from the RegExp.

Thanks

1 Like

any update ?

Capturing groups are not supported by GitLab.

PS: regular expressions also work with strings, not ints. So you would get str("100") < str("42"), but probably expect int(100) > int(42).