I need to match if a sentence starts with a capital and ends with [?.!] in Python.
EDIT It must have [?.!] only at end but allow other punctuation in the sentence
import re
s = ['This sentence is correct.','This sentence is not correct', 'Something is !wrong! here.','"This is an example of *correct* sentence."']
# What I tried so for is:
for i in s:
print(re.match('^[A-Z][?.!]$', i) is not None)
It does not work, after some changes I know the ^[A-Z]
part is correct but matching the punctuation at the end is incorrect.