Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Regex Text Replacement

81 sites No security coverage
View on drupal.org

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>
    

Activity

Total releases
2
First release
Apr 2025
Latest release
5 months ago
Releases (12 mo)
1
Maintenance
Active

Releases

Version Type Release date
1.0.1 Stable Feb 11, 2026
1.0.0 Stable Apr 11, 2025