[SalesForce] Check if string contains specific characters- Validation Rule

I have a field text that cannot contain either l m or p whether it is upper or lower case. How can I accomplish this in a validation rule?

Please give examples. Perhaps a regular expression example or if there are functions that can be used

Best Answer

This regex formula will work in a validation rule:

REGEX(Field__c, ".*[lLmMpP].*")

It says the field can start with any character, contain the letters you don't want and then end with any character.