---
title: "Regex Parser"
slug: "regex-parser"
updated: 2024-11-26T17:14:57Z
published: 2024-11-26T17:14:57Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.tritondigital.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Regex Parser

If all else fails, solve your problem with a regex. The **Regex Parser** uses the .NET regular expression language, and relies on named groups to extract RAS message attributes ([https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference)).

| **Param name** | **Mandatory** | **Description** | **Default Value** | **Possible Value** |
| --- | --- | --- | --- | --- |
| Encoding | Yes | Source encoding of the message coming from the automation system. | utf-8 |  |
| StartBytes | No | Bytes delimiting the beginning of a valid message. Any bytes before this will be discarded. |  | Bytes, in hexadecimal notation. |
| EndBytes | Yes | Bytes delimiting the end of a valid message. |  | Bytes, in hexadecimal notation. |
| Pattern | Yes | The regex pattern, including the capturing groups with their field names. |  | Not null. |

**Example XML:**

```xml
<RegexParser>
   <StartBytes></StartBytes>
   <EndBytes>0D0A</EndBytes>
   <Encoding>utf-8</Encoding>
   <Pattern>(?<cartNumber>S0P,(?!A,0,0,0,0,0,0,0,0).*)</Pattern>
</RegexParser>
```
