Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Views Regex Functions

19 sites No security coverage Drupal 9–11 Views ecosystem
View on drupal.org

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!

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 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