Regex for Branch Filtering in CircleCI

Overview

You may have encountered some difficulty wildcarding your branch filters in the past with something like release*, and not seeing it work as expected. The reason that you are seeing this behavior is because we do not use the simplified version of regex in our configuration files, as it interferes with compiling. We use the Java util regex pattern

 

How Can I Use This?

Here are a few examples of how to achieve some different filtering use cases for a branch with "release" in the branch name:

  •  Starts with 'release':'^release.*'
  •  Ends with 'release':'.*release$'
  • Contains 'release':'.*release.*'

Additional Resources:

Was this article helpful?
0 out of 2 found this helpful

Comments

0 comments

Article is closed for comments.