Егор Лебедев
Егор Лебедев

Reputation: 1336

regex check string in camel case without non-character symbols

I got ^[a-z]+([A-Z]?[a-z]+)+ regex to check camel case, how to make it also check that there is no non-character symbols in string?

Upvotes: 1

Views: 169

Answers (1)

ADev
ADev

Reputation: 686

Use $ at the end of your expression:

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

Upvotes: 3

Related Questions