I need to workout a way to test a string contains some words or not, doesn't matter uppercase or lowercase. E.g
String ppe1 = "Mask"
String ppe2 = "mask"
String ppe3 = "MASK"
then when I do
return ppe1.matches("[A-Za-z]*mask") // it should return true
or
return ppe2.matches("[A-Za-z]*mask") // it should return true
or
return ppe3.matches("[A-Za-z]*mask") // it should return true
I know above regex is totally wrong,, but just wish to demo my idea for what I need, In a simple word, as long as string contains term 'Mask' , doesn't matter 'MASK' or 'mask' or 'mASk' or 'masK' or whatever combo, regex should detect the term and always return true. Please suggest with code example. Thanks