Hi, I tried searching similar threads, but no one seemed to be able to solve this issue.
If I have a sentence such as “This is just an example phrase for demo purposes”
and I also have a list such as [“list”, “with”, “different”, “words”,“example”]
Is there a way of check if the sentence contains any word from the provided list?
Thanks.
Broader context:
I’m trying to create a habits feature for a Todo app and I want to implement a feature where the user can select which days the habit is on (Sun, Mon, Tues, Wed, Thurs, Fri, Sat).
I currently have a list of days where the habit is recurring [Monday, Wednesday, Friday] and a list of string dates for the next week [“Tuesday, January 17, 2023”, “Wednesday, January 18, 2023”, […], “Sunday, January 22, 2023”].
How can I get a list of all the dates with only the dates for Wednesday, Friday and Monday?
Thanks for the reply, it wasn’t quite what I was looking for, but your intersect with comment made me realize what I was looking for. I will post it as a solution as you were able to answer my initial question.