Question

Write a program that Assume that sentences are terminated by one of .!?, and that words are space separated. You will need to, and must, use strtok_r for spliting the strings.

Example run:

Please enter the string to analyse
abba and a bee. aah mama mia. there we go again. in the city of miami.
Please enter the regular expression : a[bm].*[ai]
abba and a bee
Yes   4 words
aah mama mia
Yes   3 words
there we go again
No    4 words
in the city of miami
Yes   5 words

Answer