Text and pattern matching in Zoho DataPrep

Text and pattern matching

Zoho DataPrep supports the following text and pattern matching types. 

Text literals: Text literals are used to match the exact specified text in your data. 

Regular expressions: Regex are used to match data based on the expression provided. For example, the regex ^\d+ is used to match any number of digits in the input data from the staring position.

Patterns: Pattern tokens provide a simpler and more readable alternative to regular expressions. 

The following section describes how pattern matching works in Zoho DataPrep.

Patterns

The following table contains the list of tokens and the syntax for each pattern supported in DataPrep.

Character patterns

These tokens apply to one or more characters part of the text data type.
 
 Pattern
Description
 {alpha}
Set of all alphabets [A-Za-z]
 {alpha_numeric}
Set of all alphabets and numbers [A-Za-z0-9]
 {lower}
Set of all lower characters [a-z]
 {upper}
Set of all upper characters [A-Z]
 {digit}
Set of all integers [0-9]
 {number}
Set of all integers and decimal numbers
 {special_character}
Set of all special characters [e.g. -/,*&^%#@! etc.]
 {white_space}
A white space character [' ']
 {any}
Set of all characters
 {other}
Set of all non-ASCII characters
 {'constant'}
Matches the given text enclosed inside single quotes or double quotes
 {word}
Set of all alphabets, numbers and underscore i.e. {alpha_numeric} (including underscore)
 {username}
Characters prefixed with @
 {hashtag}
Characters prefixed with #

Position patterns

These tokens apply to the positions relative to the text data type. 
  
 Pattern
Description
 {start}
Start of the line
 {end}
End of the line

Pattern construction

The following rules apply while constructing patterns for matching data.
  1. Enclose a pattern token within '{ }'.
    E.g. {alpha}

  2. Append a '*' after the token to match zero or more number of occurrences.
    E.g. {alpha}*

  3. Append a '+' after the token to match one or more number of occurrences.
    E.g. {alpha}+

  4. Append a number after the token to match the exact number of occurrence.
    E.g. {alpha}{3}

  5. Enclose a lower and upper bound constraint within '{ }' after the token to match within a specified range.
    E.g. {alpha}{2,5}

  6. Enclose constants within ' ' to form a token.
    E.g. {'Bob'} 
You can add tokens one after the other to construct a full length pattern with multiple matching conditions. If you wish to match either of the two patterns, use the logical OR condition using ' | ' in between the two patterns.
For e.g., {'Bob'} | {'Robert'}

Pattern examples

1. Pattern to match the first word in a text. 

Input data

DataPrep supports pattern matching.

Pattern

{start}{alpha}+

Matched data

DataPrep


2. Pattern to match the last 3 digits of a country calling code. 

Input data

+1 340

Pattern

{digit}{3}{end}

Matched data

340

 
3. Pattern to match a credit card number: 

Input data

1234-1234-1234-1234

Pattern

{start}{digit}{4}{special_character}{digit}{4}{special_character}{digit}{4}{special_character}{digit}{4}{end}

Matched data

1234-1234-1234-1234


Note: You can include the {start} and {end} tokens to match the data only when the pattern is found across the entire cell value.

SEE ALSO

    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









                                      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

                                            Zoho Desk Resources

                                            • Desk Community Learning Series


                                            • Digest


                                            • Functions


                                            • Meetups


                                            • Kbase


                                            • Resources


                                            • Glossary


                                            • Desk Marketplace


                                            • MVP Corner


                                            • Word of the Day


                                              Zoho Marketing Automation

                                                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 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

                                                                                                        • Extract from text

                                                                                                          Zoho DataPrep offers options to identify and extract a subset of the data from a column. You can extract very specific portions of the column data using the extract transform. For example, your column contains a mixture of letters and numbers, but ...
                                                                                                        • Target Matching

                                                                                                          Target matching allows you to set a target and align the source dataset to match with your target before exporting data. You can attach a target dataset to match the column structure, formats, and the data types in the existing source dataset. This ...
                                                                                                        • Create buckets - Text

                                                                                                          You can choose to implement bucketing in a text column using conditions. Consider a situation where you need to assign people to specific teams. You can implement the logic of adding values to a bucket, which in this case is the team name. Name Team ...
                                                                                                        • Find and Replace

                                                                                                          Find and replace values in your column using the replace transform. You can find the value to replace by matching the value using different options available and replace it with your input. To find and replace column data 1. Right-click the column ...
                                                                                                        • Smart selection

                                                                                                          Zoho DataPrep offers you an array of suggestions using the pattern matching notations when you select portions of the column data that you wish to transform. Note: If you are not familiar with pattern matching in DataPrep, read about it here . You ...
                                                                                                          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