Kuan
Kuan

Reputation: 11389

How to match capitalized/all-uppercase/all-lowercased word in Regular expression

All:

As title.

How to make word pattern like Hello/HELLO/hello

Thanks

Upvotes: 0

Views: 66

Answers (1)

anubhava
anubhava

Reputation: 784898

You can use this regex:

^([A-Za-z][a-z]*|[A-Z]+)$

RegEx Demo

Upvotes: 1

Related Questions