Regular Expressions 101

Community Patterns

Is Sentence Correct

1

Regular Expression
ECMAScript (JavaScript)

/
(^[A-Z])([^.!?]*)([.!?])$
/

Description

it starts with a capital letter; it ends with a full stop, question mark or exclamation point ('.', '?' or '!'); full stops, question marks and exclamation points don't appear anywhere else in the sentence.

Submitted by Hafiz - 3 years ago