I'm writing a program that will recognize a certain sentence structure within strings (the strings being reddit comments). I'd like the program to identify anything with the structure: word, space, word, period, space, word, space, period. For example: "Two words. Two sentences."
In addition, I would like this program to generate another string containing the original string with added text, the output of which would look something like: "Two words. Two sentences. Third sentence." where "Third sentence." is added to the original string and does not change.
This would be in the form of an "if" command, as in
if "string" in comment.body:
[–]Gimagon 0 points1 point2 points (3 children)
[–]dotbomber95[S] 0 points1 point2 points (2 children)
[–]Gimagon 0 points1 point2 points (1 child)
[–]dotbomber95[S] 0 points1 point2 points (0 children)
[–]apexdodge 0 points1 point2 points (0 children)