Due to confidentiality, I can’t show my exact text. But the main idea is I have a list of keywords, and I want to count each time anyone of them occur in a text. Thank you
Eg
Keywords: Sales, Revenue
Text: The Sales for 2020 is $4000 and the Revenue $5000. While the Sales for 2019 is $3000.
You can use regex matches activity. Pass In your key work as the regex pattern and it will return all instances of that match. You can then get the count of that.
You can use
Regex.Matches(str,Regex.Escape(“Sales”)).Count.ToString and Regex.Matches(str,Regex.Escape(“Revenue”)).Count.ToString so on to count the occurrences.