Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

views_regex_functions

15 sites No security coverage
View on drupal.org

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!

Activity

Total releases
2
First release
Feb 2025
Latest release
1 year ago
Release cadence
0 days
Stability
50% stable

Releases

Version Type Release date
1.2.0 Stable Feb 21, 2025
1.2.x-dev Dev Feb 21, 2025