Create pattern

Syntax

	regex($string)

Description

Generates a regular expression pattern from the given string. The pattern can be applied to strings using the regexSearch() and regexReplace() expressions.

Parameters

Name Type Description Mandatory Default
string String A regex expression from which the pattern should be created. yes

Return Value

Type: Business Object

A regular expression pattern that can be applied to string.

Examples

Letters and numbers

	regex("[A-Za-z0-9]")

Output: Pattern for any Latin letter or number.

Numbers

	regex("[0-9]")

Output: Pattern for any digit.