I am a noob in Java and i want a regex pattern to match sub strings in a sentence. I have multiple sub strings from which,
i want to test if any of the sub string is there in my sentence or not.
sub strings : ice cream, coffee, new brand
Sentence1 : I have had ice cream this month.
Sentence2: I made the bill payment for coffee with card.
Sentence 3: He just signed with new brand this week
Regex for Substrings : "(ice cream|coffee|new brand).*"
What should be the correct regex in Java for this?