Regex

Regex

The Regex (regular expressions) field allows you to collect input that must match a specific pattern. Use this field to enforce strict formatting for specialized data such as national ID, tax identifiers, or custom alphanumeric sequences ensuring that data entered is in a specific, structured format.

Adding a Regex field to your form

  1. In your form builder, locate the Regex under Textbox section and drag and drop it on to your form.

    Regex Field

  2. The field appears with a default label and regex pattern. Click the properties to edit it.

Configuring Regex Pattern

Click the edit icon in the Configured Regex card within the Properties panel to open the configuration popup.

Regex Configuration

Regex Configuration

The Regex Validation popup lets you build a multi-segment validation rule. Each segment is a row that can either be a Pattern or Text.
  1. Pattern: Here you can configure your own regex pattern that the respondent's input must match.

    For example, to collect a Social Security Number (SSN), you would add three Pattern rows with ^[0-9]{3}$, ^[0-9]{2}$, and ^[0-9]{4}$, each separated by a Hyphen, producing the format 123-45-6789. Learn more about the structure and common errors that occur in regex patterns.

    Pattern

  2. Text: Here you can enter a static text to be displayed in the live form. This will be a fixed, read-only text that can be added as a prefix or sufix to the pattern.

    For example, to collect a Zylker Employee ID, you would add a Text row with ZYL and a Pattern row with ^[A-Z]{2}[0-9]{4}$, separated by a Hyphen, producing the format ZYL-HR1042.

    Text

Notes
Note:
  1. Up to 4 rows can be added in total.
  2. At least one Pattern row is required.
  3. A maximum of 2 Text rows are allowed.

Separator

A Separator sits between rows and defines the character that connects the segments in the live form. For example, if you have a Text row "EMP" and a Pattern row for digits, a hyphen separator will display them as EMP-001 in the live form.

Available separators are Space (\s), Hyphen ( - ), Colon ( : ), Comma ( , ), Slash ( / ), Underscore ( _ ). 
Notes
Note: Ensure the separator character is not used within the regex pattern or text. Using the same character in both may cause validation conflicts for respondents.

Preset Patterns

Click the preset icon preset patterns icon (lines icon) in any Pattern row to choose from a list of built-in regex patterns. Each preset shows its name and the corresponding pattern.

Preset Patterns


Field Properties

After configuring the regex rules, you can further customize the field from the Properties panel. 

Field Properties

  1. Field Label: The name displayed above the field in the live form.
  2. Placeholder Text: Configure individual placeholder text for each input segment. Click Configure Placeholders to set them.
  3. Configured Regex: Displays the configured validation rule. Click the edit icon to modify.
  4. Initial Value: A pre-filled default value for the field. Must match the configured pattern.
Info
Tip: If you're new to regex, you can use online tools to generate patterns based on sample input. Regex Generator is one such tool that builds patterns from examples. Note that this is a third-party tool and Zoho Forms is not responsible for its accuracy, or content.

        Create. Review. Publish.

        Write, edit, collaborate on, and publish documents to different content management platforms.

        Get Started Now


          Access your files securely from anywhere

            Zoho CRM Training Programs

            Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

            Zoho CRM Training
              Redefine the way you work
              with Zoho Workplace

                Zoho DataPrep Personalized Demo

                If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

                Zoho CRM Training

                  Create, share, and deliver

                  beautiful slides from anywhere.

                  Get Started Now


                    Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                    BOOK A SESSION







                                Quick LinksWorkflow AutomationData Collection
                                Web FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                Digital FormsMarketingForms for Small Business
                                HTML FormsEducationForms for Enterprise
                                Contact FormsE-commerceForms for any business
                                Lead Generation FormsHealthcareForms for Startups
                                Wordpress FormsCustomer onboardingForms for Small Business
                                No Code FormsConstructionRSVP tool for holidays
                                Free FormsTravelFeatures for Order Forms
                                Prefill FormsNon-Profit

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG

                                  Zoho FSM Video Tutorials


                                        All-in-one knowledge management and training platform for your employees and customers.

                                                  Create. Review. Publish.

                                                  Write, edit, collaborate on, and publish documents to different content management platforms.

                                                  Get Started Now




                                                                    You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                        Manage your brands on social media


                                                                          • Desk Community Learning Series


                                                                          • Digest


                                                                          • Functions


                                                                          • Meetups


                                                                          • Kbase


                                                                          • Resources


                                                                          • Glossary


                                                                          • Desk Marketplace


                                                                          • MVP Corner


                                                                          • Word of the Day


                                                                          • Ask the Experts


                                                                            Zoho Sheet Resources

                                                                             

                                                                                Zoho Forms Resources


                                                                                  Secure your business
                                                                                  communication with Zoho Mail


                                                                                  Mail on the move with
                                                                                  Zoho Mail mobile application

                                                                                    Stay on top of your schedule
                                                                                    at all times


                                                                                    Carry your calendar with you
                                                                                    Anytime, anywhere




                                                                                          Zoho Sign Resources

                                                                                            Sign, Paperless!

                                                                                            Sign and send business documents on the go!

                                                                                            Get Started Now




                                                                                                    Zoho TeamInbox Resources





                                                                                                              Zoho DataPrep Demo

                                                                                                              Get a personalized demo or POC

                                                                                                              REGISTER NOW


                                                                                                                Design. Discuss. Deliver.

                                                                                                                Create visually engaging stories with Zoho Show.

                                                                                                                Get Started Now








                                                                                                                                    • Related Articles

                                                                                                                                    • Understanding Regex Patterns

                                                                                                                                      A regex pattern screens each character in a form input against a set of rules. Before the pattern is saved, Zoho Forms checks it for structural validity, ensuring text elements like letters, numbers, or symbols appear in the correct sequence. Regex ...
                                                                                                                                    • Zoho CRM field

                                                                                                                                      The Zoho CRM field is a lookup field that helps you fetch data from a Zoho CRM module and prefill your form fields. Prefilling forms with data simplifies the form filling experience for your respondents and saves time. You can also push form entries ...
                                                                                                                                    • Zoho Vertical Field

                                                                                                                                      The Zoho Vertical field is a lookup field that helps you fetch data from a Zoho Vertical module and prefill your form fields. Prefilling forms with data simplifies the form filling experience for your respondents and saves time. You can also push ...
                                                                                                                                    • Adding a new record to a Zoho Vertical module

                                                                                                                                      Using the Zoho Forms - Zoho Vertical integration, you can automatically push your form responses into Zoho Vertical modules each time a new form entry is received. You can also trigger certain actions in Zoho Vertical such as Workflow Rules, ...
                                                                                                                                    • Overview

                                                                                                                                      Table of contents Overview How does dynamic prefilling work? Choosing the right Prefill field Adding a Prefill Field Response Formats for the Field Types Pricing Overview Prefill fields in Zoho Forms allow you to dynamically populate form fields with ...
                                                                                                                                      Wherever you are is as good as
                                                                                                                                      your workplace

                                                                                                                                        Resources

                                                                                                                                        Videos

                                                                                                                                        Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                        eBooks

                                                                                                                                        Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                        Webinars

                                                                                                                                        Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                        CRM Tips

                                                                                                                                        Make the most of Zoho CRM with these useful tips.



                                                                                                                                          Zoho Show Resources