1

Let's say I have a rule like this,

- if: '$CI_COMMIT_TITLE =~ /^(fix|feat|perf|docs|build|test|ci|refactor)\S*:/'

It occurs to me that ^ does not match the start of any line in a multiline regex, only the start of the first line. That raises the question,

  • Does anything match the newline?
  • Is there a multi-line regex mode?

Where is the GitLab Regex documented? What Regex implementation do they use?

1 Answer 1

0

GitLab uses Ruby's core regex implementation which is Onigmo (Oniguruma-mod). I found that from looking at the source code in Ruby's regex.c.

Official documentation is mostly here: https://github.com/k-takata/Onigmo/blob/master/doc/RE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.