Table of Contents

Formulas - Regex

Sofia Teran Updated by Sofia Teran

Regex

Formulas available:

  • RegexText
Examples of use case of Array formulas:

RegexText

Let's imagine that you want to have a specific number of digits:

  1. Add a text block instead of number block
  2. Save the variable
  3. Add a Formula block 
  4. Choose the RegexTest Formula and copy this: RegexTest(/^\d{11}$/, @code_number)  You can edit this number {11} according to your needs and the @code_number will be the variable that you saved in the text block. 
  5. Don't forget to save the variable of the Formula block on the output "True/False"

RegexTest(/^\d{11}$/,@code_number)

You'll be able to set in the builder bot:

  • The True output (green arrow) to confirm the user that the number is in the correct format and with the correct number of digits.
  • The False output (red arrow) to send a message explaining that it's incorrect and connect this message with the text block to start the flow again (asking for the number). 

 

How did we do?

Formulas - Comparison

Formulas - Math

Contact