Rules Regex

Categories

RDF

Component ID

2593151

Component name

Rules Regex

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This module adds regular expression (regex) actions to Rules. The idea is to allow site-builders to manipulate text data (especially from Feeds) without having to resort to PHP.

Specifically you can:

  • Find and replace text within a field, modifying it in place.

  • Find a pattern and generate a replacement, leaving the original text unmodified.

  • Match a regular expression against some text, getting access to all the sub-pattern matches.

Requirements

In order to use this module you need Rules installed and you should understand the Rules concepts of actions and variables. You should also be familiar with the concept of a regular expression.

Known Problems

At the moment the module allows you to use all PCRE pattern modifiers. This gives the writer of the regex the ability to execute PHP, so that ability must be restricted to administrators. A future enhancement will restrict this.

Related modules

The following are related modules. They are all more complex and don't appear to have stable releases for Drupal 7 yet.

Credits

This is based on a custom module paid for by alpennia.com