Regular Expressions 101

Conventional Commit Footer

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
^(?<token>[\w\-]+|BREAKING CHANGE)(?<seperator>: | #)(?<value>.*?(?=^([\w\-]+|BREAKING CHANGE)(: | #)))
/
gms

Description

Supports multi line value for git trailers with lookahead for beginning of next git trailer

Submitted by Christos Cunning