On 06/05/2014 10:46 AM, abid rahman wrote: > For example, I want to check if a string is either "abc" or "xyz". How > can I check it? > > IF(string1 MATCHES "abc\|xyz" doesn't work? For the exact string (not substring): if(string1 MATCHES "^(abc|xyz)$") Or without regex: if(string1 STREQUAL abc OR string1 STREQUAL xyz) Nils