human
Limit the number of sentences in a string
assistant
Here is some code to extract first two substrings in string `phrase` that end in `.`, `?` or `!`

re.match('(.*?[.?!](?:\\s+.*?[.?!]){0,1})', phrase).group(1)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.