HomeGuidesAPI Reference
Log InTalk to Sales
Guides

Data Cleaning & Formatting (Regex Guide)

What is Regex? Regex (Regular Expression) is like a super-powered "Find and Replace" tool. It allows the system to recognize patterns—like a phone number, a date format, or a specific ID—and automatically fix or validate them before they enter your database.

  1. Smart Validation (matches_regex)

Use this when you want to "double-check" a column. If the data doesn't match your pattern, the system can flag it as an error.

  • Business Benefit: Stops "bad data" (like incorrectly formatted dates) from causing system errors later.
  • Where to find it: Inside the "Conditional Blocks" list in your editor.
  • Example: Check for YYYY-MM-DD
  1. Auto-Fixing Data (regex_replace)

This tool finds data that is "messy" and fixes the formatting automatically.

The "Swap" Trick: You can tell the system to "grab" parts of a cell and rearrange them. For example, grabbing a day, month, and year and putting them in a different order.

Example: Fix Date Format (DD/MM/YYYY to YYYY-MM-DD)

  1. Admin Checklist for Regex

To ensure your rules work perfectly, follow these three tips:

  • Double the Backslashes: In our editor, always use a double backslash (e.g., \d instead of \d). This is a technical requirement for JSON.
  • The "Safety Net": If the system looks for a pattern and doesn't find it, it won't break the file. It will simply keep the original value and move on to the next rule.
  • Test Before Saving: Always use the "Test Function" (found in Configuration > Advanced Configuration) with a 10-row sample file to see your "Before" and "After" results side-by-side.