Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views Regex Functions

No security coverage Maintenance fixes only 19 sites

Part of the Views ecosystem · 280 projects

This module allows you to use regular expressions to manipulate and filter data within Drupal views. You can define custom text outputs based on regex replacements or create filters that include or exclude rows matching specific regex patterns.

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!
Drupal 9–11

Ask your assistant about Views Regex Functions

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

  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Jan 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.2.0 Stable 9–11 Feb 21, 2025
1.2.x-dev Dev 9–11 Feb 21, 2025
1.1.x-dev Dev 9–11 Jan 4, 2025