Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(?<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 - 3 years ago