Regular eExpression in Salesforce Validation Rules

Regular eExpression in Salesforce Validation Rules

A regular expression is a string used to describe a format of a string according to certain syntax rules.

[ab]   – A single character, either a or b
[a-zA-Z]  – A single uppercase or lowercase character
\d         – A digit
\s         – A whitespace character
X?         – Zero or one occurence of X
X*         – Zero or more occurences of X
X+         – One or More occurences of X
X{n} – n occurences of X

Sample Regular expression validation rules:

https://www.infallibletechie.com/2012/10/regular-expression-for-email-validation.html

https://www.infallibletechie.com/2013/09/regular-expression-for-numbers-alone.html

https://www.infallibletechie.com/2012/06/regular-expression-using-apex-in.html

https://www.infallibletechie.com/2012/11/validation-rule-for-numbers-and-special.html

Cheers!!!

Leave a Reply