Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Regex Text Replacement

Security covered Maintenance fixes only 93 sites

This module adds a filter to text formats that allows for complex text replacements using regular expressions. It can be used to automate the modification of content based on defined patterns and their replacements.

Adds a filter that can be applied to text formats to make complex replacements.

Requirements

This module requires no modules outside of Drupal core.

Installation

Install as you would normally install a contributed Drupal module. For further
information, see Installing Drupal Modules.

Configuration

  1. Visit your text formats and editors at admin/config/content/formats
  2. Edit a text format
  3. Add the Regex Text Replacement filter. For example, the following will replace h2 tags with h3...
    /<h[1|2]([^>]*)>(.*?)<\/h[1|2][^>]*>/mi||<h3(1)>(2)</h3>
    
Drupal 10–11 PHP 8.1

Ask your assistant about Regex Text Replacement

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • filter Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Oct 2024
Latest release
1 month ago
Releases (12 mo)
2
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.2 Stable 10–11 PHP 8.1 Sep 9, 2026
1.0.1 Stable 9–11 Feb 11, 2026
1.0.0 Stable 9–11 Apr 11, 2025
1.0.x-dev Dev 9–11 Oct 21, 2024