---
title: "Feature: #106072 - Introduce regex-based replacements for slugs"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-106072-1738662608"
source: "Changelog/14.0/Feature-106072-IntroduceRegexBasedReplacementsForSlugs.rst"
typo3-version: "14.0"
typo3-major: 14
type: "feature"
issue: 106072
forge: "https://forge.typo3.org/issues/106072"
tags: ["TCA", "ext:core"]
rendered: "2026-09-23T15:30:34+00:00"
---

# Feature: #106072 - Introduce regex-based replacements for slugs {#feature-106072-1738662608}

See [forge#106072](https://forge.typo3.org/issues/106072)

## Description {#description}

A second replacement configuration array has been added to support
regular expression (regex)-based definitions. This allows defining
case-insensitive or wildcard replacements for slug generation.

> [!NOTE]
> Regular expression replacements are applied **before** any sanitation
> of the field values takes place. This means:
>
> -   Values are still in their original form - not lowercased or otherwise processed.
> -   The replacements apply only to the fields defined in
>     `['generatorOptions']['fields']`.
> -   No automatic escaping or character detection is performed, so
>     patterns must be written carefully.
>
> Keep these points in mind when defining regex patterns.

## Impact {#impact}

Slug fields now support a new `regexReplacements` configuration array
inside `generatorOptions`.

**Example TCA configuration**

```php
$GLOBALS['TCA'][$table]['columns']['slug']['config']['generatorOptions']['regexReplacements'] => [
    // Case-insensitive replacement of Foo, foo, FOO, etc. with "bar"
    '/foo/i' => 'bar',
    // Remove string wrapped in parentheses
    '/\(.*\)/' => '',
    // Same, using a custom regex delimiter
    '@\(.*\)@' => '',
];
```
