Regular Expressions 101

Community Patterns

Pascal Case - no digits allowed

0

Regular Expression
ECMAScript (JavaScript)

/
^[A-Z](([a-z]+[A-Z]?)*)$
/
gm

Description

To be proper pascal case with no digits allowed, a word:

  • MUST start with an upper case alphabet (A through Z)
  • MUST have no digits (0 - 9)
  • MUST have no spaces, punctuation or special characters
  • CAN have at most 1 uppercase alphabet in a row
  • CAN end in an uppercase alphabet

Notable examples

  • A is valid pascal case
  • Ag is valid pascal case
  • AaA is valid pascal case
Submitted by anonymous - 2 years ago (Last modified 2 years ago)