Regex Text Replacement
81 sites
No security coverage
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
- Visit your text formats and editors at admin/config/content/formats
- Edit a text format
- 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>