Feature: #106072 - Introduce regex based replacements for slugs

See forge#106072

Description

Adds a second replacement config array to provide regex based definitions. This way it's possible to define case-insensitive or wildcard replacements.

Impact

Slug fields have now a new regexReplacements configuration array inside generatorOptions.

'generatorOptions' => [
  'regexReplacements' => [
      '/foo/i' => 'bar', // case-insensitive replace of Foo, foo, FOO,... with "bar", ignoring casing
      '/\(.*\)/' => '',  // Remove string wrapped in parentheses
      '@\(.*\)@' => '',  // Remove string wrapped in parentheses with custom regex delimiter
   ],
],
Copied!