I have a scenario where I need to check for string contains, but for exact match of comma separated words.
example = "US,UK,IN,NOT_APPLICABLE"
I want to check above string contains specific word like 'US' or 'LE'
example.contains('US') . - expecting TRUE
example.contains('LE') - expecting FALSE
If I use normal :contains(), case 2 will also return TRUE since 'LE' is part of 'NOT_APPLICABLE'
But I want to check contains for comma separated values strictly.
Is there any easy way to achieve this?