Documentation · ViewHelper reference

XSD schema file | vhs 2.1.3

Format / RegularExpressionViewHelper

Formats or gets detected substrings by regular expression. Returns matches if return="TRUE", otherwise replaces any occurrences of $pattern. simply returns

  • Tag usage example

    <v:format.regularExpression pattern="NULL" replacement="NULL" subject="NULL" return="1">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:format.regularExpression(pattern: 'NULL', replacement: 'NULL', subject: 'NULL', return: 1)}


Argument Description Type

The regular expression pattern to search for


The desired value to insert instead of detected matches

return boolean

The subject in which to perform replacements/detection; taken from tag content if not specified.

Required attribute

Revision history

commit ad218955ca9478426c13ee05c3b42da93d356a56
Author: Claus Due <*****>
Date:   Fri Sep 13 00:23:48 2013 +0200

    [FEATURE] Format / RegularExpression ViewHelper

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to file