How to use regex in chatbot?
Drag and drop the Message element item from the left pane of the chatbot builder. Activate the "Wait for subscriber's reply" option. Select the "Regular expression" as validation. Enter your expression in the Regular Expression field.
How to validate text with regex?
To validate a field with a Regex pattern, click the Must match pattern check box. Next, add the expression you want to validate against. Then add the message your users will see if the validation fails. You can save time for your users by including formatting instructions or examples in the question description.