Regex
Constructs a regular expression from text.
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions and http://stackoverflow.com/questions/46155/validate-email-address-in-javascript for information about regular expressions.
Syntax
Regex(exp, flag)
Enabled for
Search/Dashboard | No |
Business Rules | Yes |
Quick Actions | Yes |
Workflow Objects | No |
Reports | No |
Parameters
exp | The regular expression, without slashes. |
flag | (Optional) The flags associated with the regular expression. |
Return Value
Regular expression, which is a text value.
Example
Regex("^(([^<>()[\]\\\\.,;:\\s@\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\"]+)*)|(\\".+\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$","i")
This example returns a regular expression that matches a valid email address.