Matches pattern not working

Hi guys , I have a problem, I use this ‘when’ condition to check if jobs on master branch or GitHub release tag looks like ‘1.1.1’ but it’s not working. Any suggestion

  - when:
      condition:
        or:
          - equal: [ "master", $CIRCLE_BRANCH ]
          - matches:
              pattern: ^\d+\.\d+\.\d+$
              value: << parameters.docker-image-tag >>

Hi,

It is hard to tell what is going on as you are only able to provide part of your script, but the condition’s structure is valid so you may need to check the values of the parameters you are checking against.

To check the condition I used the following simple test script and just altered the values to see what the outcome would be.

version: 2.1

jobs:
    build-and-test:
        docker:
          - image: cimg/node:16.10
        resource_class: large
        steps:
          - run: echo "start of run"
          - when:
              condition:
                or:
                 - equal: [ "master", "master" ]
                 - matches:
                       pattern: ^\d+\.\d+\.\d+$
                       value: "1.1.1"
              steps:
                - run: echo "condition meet"
          - run: echo "end of run"
          
workflows:
    sample:
      jobs:
        - build-and-test