Regular Expressions 101

Community Patterns

1...56789...190

Text case matcher, grouping words no separator

0

Regular Expression
ECMAScript (JavaScript)

/
([^\s\-_A-Z]+)|([A-Z]+[^\s\-_A-Z]*)
/
g

Description

This regex is intented to match all words in a given string, remove all case separators. It match strings written in PascalCase, camelCase, kebab-case or snake_case.

Submitted by Florent Catiau-Tristant - 2 years ago