On this page
article
23.12-message-format
Problem
We need some format how to describe commit message style in configuration. Because bare regex is too complex for that task.
Variants
/^([\w\-\.]+){1}(\([\w\-\.]+\))?(!)?: (.+)/
# regex{{ type }}{{ (context)? }}: {{ title }}
# mustache$type$(context)?$!?: $title
# php[task]: [type] [title]
# square(type)(\(context\))?(!)?: (title)
# regex simplified(type)((context))?(!)?: (title)
# regex simplified auto escape[type][(context)]?[!]?: [title]
# regex simplified square
regex simplified auto escape
chosen
It seems like regex simplified square
is most obvious.
But there is not much difference with regex simplified auto escape
and round brackets closer to well known reqex groups.