Integromat
  • Back to website
Articles in this section
  • Replacing Legacy Modules with New Modules
  • Upgrading Gmail and Email App Versions Using Integromat DevTool
  • App lifecycle
  • Replacing Google Sheets legacy Modules with New Modules
  • How to get Text Parser to produce an output value.
  • Converger
  • Types of modules
  • Iterator
  • Aggregator
  • Module settings
See more
  1. Integromat Support
  2. Using Integromat
  3. Modules

How to get Text Parser to produce an output value.

Timothy Sabelanga Timothy Sabelanga Updated April 16, 2021 12:59

If you can not get text parser to produce any output.

Case scenario example, you would like to parse the filetype of a file document "filename.docx" and the extension of the filename always varies from docx to pdf to CSV.

The expression that you may choose to use in this case is \..+

If you were to use this on regex expression on regex101.com you will rightly find that you will get a match a full match.

 

As you will notice on the image above that the file extension was correctly matched as shown in the image above and if you take and try to implement this in your text parser

you will find that you will not get a match as shown in the image below.

The reason for this is that the i shows only the number of matches per match so in this case, we have 2 matches henceforth after the i there is a numerical value 1 and 2. The use case for this is that should you ever need to match or pass data through a filter only the second matched value you can specify which value that is represented by the numerical value.

To be able to get the match values that you require to add brackets to the part that you wish to parse for example if one wishes to extract from "filename.docx" - "docx" only then according to the regex expression we are using for this case scenario the brackets should be applied on \.(.+) this will capture the docx place it in a group and leave the "." out of it.

The output shown in the picture below, you will notice that the capturing group will match any character (except for line terminators)

Another workaround thats also incorporates regex is using the replace function

{{replace("abcdefghijklmno pqr stuvw xyz.docx"; "/.*\./"; ".")}}

 Then replace abcdefghijklmno pqr stuvw xyz.docx with your actual filename variable.

Was this article helpful?
13 out of 50 found this helpful
Menu
  • Features
  • Apps & Services
  • Templates
  • Pricing
  • What's new
  • Use cases
  • Feature requests
Information
  • Privacy
  • Terms
  • FAQ
  • Help & Tutorials
  • Community
  • Academy
  • Find a partner
  • Blog
Cooperation
  • Developer platform
  • Affiliate Program
  • Become a partner
  • Schools and Universities
Company
  • About the company
  • We are hiring
  • Contact
Follow us
© 2021 Integromat by Celonis. All rights reserved. Integromat® is a registered trademark.
  • English