views_regex_functions
Views Regex Functions is a simple module that allows you to define regex replacements with fields in views. In other words, it allows you to output text based on the result of a regex replacement formula. Additionally, you can filter using regex expressions.
Please Note: This module requires no modules outside of Drupal core.
Table of contents
- Requirements
- Installation
- Configuration
- Features
- Works With
- Use Case Examples
- Supporting Organizations
Installation
Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.
Configuration
- Navigate to Administration » Structure » Views and create a view.
- Add some fields under "FIELDS".
OR
Add some filters under “FILTERS”. - Select "ADD". Scroll down to "Views: Views Regex Functions", found near the bottom of the list.
- Add and configure fields or filters.
- Choose a field to run a condition against, and provide values accordingly.
- Save, views regex functions handles the logic and returns as specified.
Features
- Field with Regex Function: This feature allows you to use a PHP Regex expression to manipulate data that shows up in a view.
- Filter with Regex Function: This feature allows you to remove rows that match or only show rows that match a PHP Regex function. (Uses the views_post_execute hook.)
Works With
Here is a list of modules that this module works well with:
PLEASE Help Us: If you find other modules this works well with and should be added to this list, please submit an issue with the following setup for this screen to be updated:
- Category: Task
- Priority: Normal
- Status: Reviewed & tested by the community
- Component: Documentation
- Assigned: tylerhastain
Documentation
Views Regex Functions Documentation
Supporting this Module
If this module saves you time or adds value to your project, you can show your support in two ways:
- Buy me a coffee to say thanks:
https://buymeacoffee.com/tylerhastain - Want to contribute or sponsor development?
Reach out directly if you're interested in helping improve or maintain the module — contributions, ideas, and support are always welcome!