Hi, I want to check number of occurrences of keywords from string based on keywords from filter datatable columns

Hi,
I want to check number of occurrences of keywords from filter datatable columns.
Note: country names with keywords will be changing each time.

Country Name Keywords (single) Keywords (More than 2 words)
India IN,Mumbai,Delhi, Hyderabad, Chennai West Bengal, Jammu and Kashmir
United States US,USA,Chicago New York, United States,Los Angeles
United Kingdom UK, London, Manchester, Liverpool United Kingdom, Birmingham-Wolverhampton

Input1 string:

“5677 IN New York,hsk Mumbai IN”
Output:
2 Indian keywords so India. Ignore New York then.
Note- It should consider IN for one time only.
Input 2
" If 6778 IN London,T566 INTER Los Angeles kk sjdj"
output-
India/United Kingdom/United States for only 1 match from each country.

Input 3:
" 677 UK small UK town Chicago, USA 78"

Output:
United States for 2 keywords.
Kindly do not consider UK for 2 times match it should be 1 time.

Hi @Mansi_Mhatre,

you can achieve this by doing some nested iterations and a RegEx pattern.

I have done this generic workflow that works for all the examples that you posted. Let me know if it is what you are looking for.

CheckStringOcurrences.7z (31.2 KB)

1 Like