Skip to main content

Darwin Tools: Value Parser (Regex)

What is the Value Parser Tool and what does it do?

S
Written by Support Team
Updated this week

The Value Parser tool in Darwin Flows allows you to break down a text string or data field into specific parts, which you can then use in subsequent steps of your flow.

This is particularly useful for isolating values within JSON data, email addresses, phone numbers, or any structured text where specific portions of the data hold unique significance.

In the tool settings, you can define specific parameters for your parsing needs:

  • What to replace (Find): This can include symbols, characters, words, or custom patterns (Regex).

  • Replace with: You can specify symbols, characters, or custom strings to substitute the original content.

While a basic search functions similarly to a "Find and Replace" utility, utilizing Regular Expressions (Regex)significantly enhances your capabilities. With Regex, you can search for complex patterns, exclude specific elements, and implement advanced rules to refine your data extraction.

When to Use the Value Parser Tool

Use the Value Parser Tool whenever you need to:

  • Extract specific values from JSON API responses.

  • Separate components of a structured text string (like splitting a full name).

  • Clean up data by isolating only the elements needed for processing.

  • Format input data (like dates or phone numbers) to match your CRM’s requirements.

Use Case Examples:

Case 1: Converting Date Format from DD.MM.YYYY to YYYY_MM_DD

  • Value to process: [date_field]

  • Search Pattern (Regex): ([0-3]\d).([01]\d).(\d{4})

  • Replace with: $3_$2_$1

Case 2: Remove tags or extra spaces from an Email value

  • Value to process: [email_field]

  • Search Pattern (Regex): \<([^>]+)\>|(\n)|(\s{4,})

  • Replace with: (Space)

How to Access and Configure the Value Parser Tool

  1. Identify the Raw Data: Open your flow and locate the step providing the "raw" or poorly formatted information.

  2. Add the Tool: Click the "+" (Plus) button underneath that specific step.

  3. Select "Tool": Choose the Tool option and select Value Parser.

  4. Configure Rules: * Select the source field.

    • Enter your Regular Expression in the search field.

    • Define the replacement value.

  5. Test Results: We highly recommend testing the tool with various data samples to ensure the Regex rules work consistently across different inputs.

✅ Success Tips

  • Double-Check Data Structure: Confirm if your data is in JSON, CSV, or plain text to set up the most accurate parsing rules.

  • Use Regex Wisely: If you are not a Regex expert, use external testing tools (like Regex101) to validate your patterns before implementing them in Darwin.

  • Divide and Conquer: If you need to isolate multiple different values from the same string, it is best to use separate Value Parser steps for each required extraction.

Frequently Asked Questions (FAQs)

What types of data can the Value Parser Tool handle? It can parse plain text, JSON data, and other structured formats. It is flexible enough to handle most delimited lists where consistent patterns are present.

Can I use the Value Parser Tool on data from other apps? Yes! Any data imported into Darwin—whether via API, file upload, or manual input—can be parsed as long as it is in a text-compatible format.

Is it case-sensitive? By default, yes. However, you can adjust your Regular Expression modifiers to ignore case if necessary for your specific workflow.

Did this answer your question?