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:


No comments:

Post a Comment