Regular Expressions 101

Community Patterns

camelCase to hyphen-case

1

Regular Expression
ECMAScript (JavaScript)

/
(?=[a-zA-Z])(?=[A-Z])
/
g

Description

Note that title case (TitleCase) will have leading hypens (-title-case)

Submitted by cyberbit - 8 years ago