Write a regex that will catch questions. Make sure that it includes "sloppy" questions - without question mark at the end of a sentence.
Here's a list of keywords:
Here's a regex pattern that can catch questions, including "sloppy" questions without a question mark at the end:
Copy code
\\b(What|How|Where|When|Why|Which|Who|Whom|Whose)\\b.*?[?\\.]?
This regex pattern will match any sentence that starts with a question word (e.g., What, How, Where, etc.) and ends with either a question mark or a period, allowing for "sloppy" questions that lack a question mark at the end. Note that the pattern assumes that each sentence is separated by a period.
Here's an example of how this pattern would match the provided list of keywords:
Please note that this regex pattern may need to be adjusted based on the specific requirements and patterns you're working with.