Regular expressions

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Define Forms > Form Controls > Control list > Text box >

Regular expressions

A regular expression is a definition of a valid pattern of characters that can be inputted in a text box (i.e a given format).

This functionality is not meant to replace any inputted text nor to place a mask for it; it simply creates an automatic validation that will not allow the user to continue if the inputted text does not satisfy that given pattern.


It is useful to include regular expressions to optimize your user interfaces so that you avoid submitting erroneous information to Bizagi (the server) and avoid typos or having to process (and re-process) information.

For example, regular expressions can help you validate: specific VAT identification numbers of countries, telephone numbers, a valid URL, or specific product codes of your business.

A brief introduction on regular expressions and the most commonly used ones is provided below.



As mentioned, the definition of a regular expression considers a valid range of characters and pattern. Optionally it can specify, any number of valid occurrences of those characters/patterns.

The syntax to define that only numbers are allowed is set as (having ^ indicate the beginning and having $ indicate the ending of the text):  



If instead of allowing any number or recurrences of number, you wish to allow exactly 3, you would use:



Similarly, to define that only letters are allowed this syntax is used:



Notice that the above specifies upper and lower case letters. Only upper case letters is specified as:



You may include additional letters outside of the standard occidental alphabet, such as the Ñ letter used in Spanish:



Allowing blank spaces is specified by using \s:



Common examples

Bizagi already includes pre-defined validations for the most common string-based patterns such as a valid E-mail address validation.

For more information about the E-mail address validation, refer to Actions and validations.


Additional and specific validations would be set in this property. You may refer to the examples presented in the table below:





A valid URL (includes mailto:, a URL having query parameters, using HTTPS, etc)


A telephone number format for a specific country; in this case just as it is valid in France


A valid VAT number for the UK


A 10-digit number


A ###-##-#### social security number as used in the U.S.A


A 9-digit zip code, as used in the U.S.A.