Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(build|chore|ci|docs|feat|fix|perf|refactor|style|test)(\([a-z][a-z0-9-]*\))?!?:\s(?!.* )[a-z](?:[ \w.''"`\\\/\-\(\)\[\],])*[A-Za-z0-9\]\)''"`](?:, (?:fixes|for) #\d+)*$
/
gm
Test String
New
## ✅ Happy Cases (should pass) ### Basic formats ci(pr): testing pr-checker.yml feat: add something [skip ci] feat: add something (extra) fix: correct the bug docs(readme): update installation guide feat: add new_feature to enhance parsing logic feat: allow multi-sections in configuration files fix: handle edge_case with underscores perf: optimize data-loading-speed style: fix indentation_issues test(api): add unit-tests for feature_x ci(pr): testing pr-checker.yml feat: handle `'quoted'` terms correctly feat: support `"double-quoted"` values in config docs: clarify use of `backticks` in examples chore(deps): bump "mutagen" chore(deps): bump `docker-compose` chore(deps): bump 'docker' chore(deps): bump "mutagen", `docker-compose`, 'docker', for #123 fix: allow .DS_Store when doing ddev composer create-project [skip ci] refactor: use `compose-spec/compose-go/v2` for `fixupComposeYaml` docs: add `.wslconfig` example ### With scope feat(ui): add button component fix(auth): handle token expiration chore(deps): update dependencies to latest docs(api-docs): improve examples with multi-part keys feat(parser): allow '`' character in identifiers fix(format): handle `'apostrophe` edge-cases style(code): clean up `"double quoted"` formatting ### With breaking change refactor!: drop support for Node 12 chore(deps)!: update major version perf(core)!: overhaul caching mechanism ### With fixes/for references fix: handle null case, fixes #123 feat: implement feature, for #456 docs: update examples, fixes #123, for #456 fix: resolve issue, for #789, fixes #101 fix(api): patch race condition, fixes #234 feat(storage): add multi-region support, for #567 ci: use `skip-package-name-checks`, pin `golangci-lint` to v2.2.1, remove `only-new-issues`, for #7415 ### Mixed case messages feat: add something Important fix: handle Special Cases feat: enable feature-request handling fix: correct multi_section parsing feat: handle `'Mixed Quoting'` inside message ## ❌ Invalid Cases (should fail) ### Type errors FEAT: add something feature: new stuff : missing type ### Scope errors feat(UI): component fix(123): invalid feat(scope!): invalid ### Description errors feat: Add something fix: 123 numbers first docs: refactor!!: drop support for Node 12 fix: _starts_with_underscore feat: ends-with-hyphen- fix: ends_with_underscore_ feat: multiple spaces inside fix: trailing space ### Reference format errors feat: something, Fixes #123 fix: something, fixes#123 docs: something, fixes #abc fix: something fixes #123 feat: something, for #123, fixes feat: something, fixes #123, , for #456 feat: something, fixes #, for #456 feat: something, fixes #123, for # feat: something, fixes #123, for 456 ### Structural errors feat:missing space feat(some-scope!invalid): description fix(scope): , fixes #123 fix(scope): fixes #123, feat(scope): invalid_char$ ### Multiple issues feat: something, fixes #123 fixes #456 feat: something, fixes #123,for #456 feat: something, fixes #123, fixes 456 feat: something, fixes #123,, for #456