--- title: "Creating regular expressions with Pathfinder" slug: "pathfinder-regex" updated: 2026-07-07T08:09:22Z published: 2026-07-07T08:09:22Z canonical: "docs.lobstersoftware.com/pathfinder-regex" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Creating regular expressions with Pathfinder Pathfinder helps you create and understand regular expressions (regex). A regex is a formal notation for text patterns. In the Lobster Data Platform, you can use it to validate, extract, or replace content in data fields. This guide covers three common use cases: - Generate a new regex from a description. - Explain the existing Pathfinder regex. - Check the validity of a regex. ## Requirements - Pathfinder must have been activated for your organization. - You already know which field you want to use regular expressions in. > [!NOTE] > **NOTE:** > > In supported input fields, Pathfinder displays a tooltip: *“Need regular expressions? Ask Pathfinder”*. The tooltip appears when you hover over the field or click inside it. A list of supported fields is provided below. ## Generate a new regex ![](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/chat_widget_scribble.svg) To create a new regular expression: 1. Open Pathfinder by clicking the Pathfinder icon in the top menu bar (the first one in the row). ![](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-IEKL1TLQ.png) 2. Describe the desired pattern in plain language. Example: *“Generate a regex for a German postal code”*. 3. Pathfinder generates a valid expression in the forma `^...$`. 4. Click the **Copy to clipboard** icon. ![](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-PIRTTWSM.png). 5. Paste the text from the clipboard into the desired field. The text is copied exactly as it is and can be used immediately. Pathfinder does not add any additional characters or formatting. ## Explain the existing regex Here's how to get an explanation of an existing regular expression: 1. Open Pathfinder. 2. Paste the regex into the Pathfinder input field. 3. Ask what it means. Example: *“What does this regex do?”* 4. Read the explanation, which includes a description of the pattern and examples. ![This regex extracts EDI message headers, including UNB and UNH segments structure.](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-1779975055650.png) Pathfinder also verifies whether the expression is syntactically valid. ## Check the validity of the expression Pathfinder automatically checks the syntax of a regex as soon as you submit it for analysis. There are two possible outcomes: - **Valid**: Pathfinder explains the pattern and provides examples. - **Invalid**: Pathfinder flags the syntax error and explains the cause. ## Supported fields The following fields support regular expression input and display the Pathfinder tooltip: | Location | Field or function | | --- | --- | | **Profiles** > **Open profile** > **Phase 3** > **Functions** | `match-pattern(a,b)`, `simple-regex-matcher(a,b)`, `regexGroupReplace()`, `regexExtract()`, `splitText()` | | **Profile** > **Open** **profile** > **Source structure (right-click on the field)** > **Define** Matchcodes | Condition: **Regular expression** | | **Profile** > **Open** **profile** > **Main settings** > **Extensions** > **Check preparsing** > **Preparsing by** | `EncodingPatcherWithRegexReplacement`: Replace characters with regex expressions | In the preparser, the tooltip appears only when the option is enabled `EncodingPatcherWithRegexReplacement`. ## See also - [Pathfinder](/v1/docs/en/pathfinder) - [Pathfinder – Security and privacy FAQ](/v1/docs/en/pathfinder-security-privacy-faq) - [Functions (GUI)](/v1/docs/en/phase-3-target-structure-functions) Lobster Data Platform's AI helper that answers questions based on product documentation and can generate content such as cron expressions, SQL queries, and regular expressions (regex). The range of functions is continuously expanded. A rule-based mechanism for automatically mapping data records to nodes in the source structure. Conditions such as *Is equal to*, *Starts with*, or *Regular expression* check attributes (e.g., header, ID). Multiple rules per node are always linked with an OR operator.