---
title: "Codeunit 3001 DotNet_Regex"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/3001-dotnet-regex/
type: codeunit
id: 3001
name: "DotNet_Regex"
app: "Base Application"
versions: "17-21"
build: 21.5.53619.63803
obsolete: "Pending 18.0"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 3001 DotNet_Regex

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/3001-dotnet-regex/

| | |
| --- | --- |
| App | Base Application |
| Versions | 17-21 |
| Obsolete | Pending 18.0, seen from 17. This codeunit is obsolete. Use the Regex codeunit in the Regex Module instead. |
| Source file | DotNet Wrappers/DotNetRegex.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| Split | (Text, Text, var Codeunit DotNet_Array) | - | public | 17-21 | - | - |
| Regex | (Text) | - | public | 17-21 | - | - |
| Replace | (Text, Text) | Text | public | 17-21 | - | - |
| Regex | (Text, var Codeunit DotNet_RegexOptions) | - | public | 17-21 | - | - |
| Regex | (Text, var Codeunit DotNet_RegexOptions, Duration) | - | public | 17-21 | - | - |
| GetCacheSize | () | Integer | public | 17-21 | - | - |
| SetCacheSize | (Integer) | - | public | 17-21 | - | - |
| GetGroupNames | (var Codeunit DotNet_Array) | - | public | 17-21 | - | - |
| GetGroupNumbers | (var Codeunit DotNet_Array) | - | public | 17-21 | - | - |
| GroupNameFromNumber | (Integer) | Text | public | 17-21 | - | - |
| GroupNumberFromName | (Text) | Integer | public | 17-21 | - | - |
| IsMatch | (Text) | Boolean | public | 17-21 | - | - |
| IsMatch | (Text, Integer) | Boolean | public | 17-21 | - | - |
| IsMatch | (Text, Text) | Boolean | public | 17-21 | - | - |
| IsMatch | (Text, Text, var Codeunit DotNet_RegexOptions) | Boolean | public | 17-21 | - | - |
| IsMatch | (Text, Text, var Codeunit DotNet_RegexOptions, Duration) | Boolean | public | 17-21 | - | - |
| Match | (Text, var Codeunit DotNet_Match) | - | public | 17-21 | - | - |
| Match | (Text, Integer, var Codeunit DotNet_Match) | - | public | 17-21 | - | - |
| Match | (Text, Integer, Integer, var Codeunit DotNet_Match) | - | public | 17-21 | - | - |
| Match | (Text, Text, var Codeunit DotNet_Match) | - | public | 17-21 | - | - |
| Match | (Text, Text, var Codeunit DotNet_RegexOptions, var Codeunit DotNet_Match) | - | public | 17-21 | - | - |
| Match | (Text, Text, var Codeunit DotNet_RegexOptions, Duration, var Codeunit DotNet_Match) | - | public | 17-21 | - | - |
| Matches | (Text, var Codeunit DotNet_MatchCollection) | - | public | 17-21 | - | - |
| Matches | (Text, Integer, var Codeunit DotNet_MatchCollection) | - | public | 17-21 | - | - |
| Matches | (Text, Text, var Codeunit DotNet_MatchCollection) | - | public | 17-21 | - | - |
| Matches | (Text, Text, var Codeunit DotNet_RegexOptions, var Codeunit DotNet_MatchCollection) | - | public | 17-21 | - | - |
| Matches | (Text, Text, var Codeunit DotNet_RegexOptions, Duration, var Codeunit DotNet_MatchCollection) | - | public | 17-21 | - | - |
| Replace | (Text, Text, Integer) | Text | public | 17-21 | - | - |
| Replace | (Text, Text, Integer, Integer) | Text | public | 17-21 | - | - |
| Replace | (Text, Text, Text) | Text | public | 17-21 | - | - |
| Replace | (Text, Text, Text, var Codeunit DotNet_RegexOptions) | Text | public | 17-21 | - | - |
| Replace | (Text, Text, Text, var Codeunit DotNet_RegexOptions, Duration) | Text | public | 17-21 | - | - |
| Split | (Text, var Codeunit DotNet_Array) | - | public | 17-21 | - | - |
| Split | (Text, Integer, var Codeunit DotNet_Array) | - | public | 17-21 | - | - |
| Split | (Text, Integer, Integer, var Codeunit DotNet_Array) | - | public | 17-21 | - | - |
| Split | (Text, Text, var Codeunit DotNet_RegexOptions, var Codeunit DotNet_Array) | - | public | 17-21 | - | - |
| Split | (Text, Text, var Codeunit DotNet_RegexOptions, Duration, var Codeunit DotNet_Array) | - | public | 17-21 | - | - |
| GetHashCode | () | Integer | public | 17-21 | - | - |
| Escape | (Text) | Text | public | 17-21 | - | - |
| Unescape | (Text) | Text | public | 17-21 | - | - |
| RegexIgnoreCase | (Text) | - | public | 17-21 | - | - |
| IsDotNetNull | () | Boolean | public | 17-21 | - | - |
| GetRegEx | (var DotNet Regex) | - | public | 17-21 | - | - |
| SetRegEx | (DotNet Regex) | - | public | 17-21 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.

Jonas Paprotka, 2026-09-20.
