Skip to content

victor-sm/Craft-TwigPCRE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Craft-TwigPCRE

Twig PCRE Filters for Craft CMS

##Filters:

See also: PHP PCRE-Functions

##Examples:

Basics:

|preg_filter(pattern, replacement, limit)

|preg_grep(pattern)

|preg_match(pattern)

|preg_quote(delimiter)

|preg_replace(pattern, replacement, limit)

|preg_split(pattern)

Please read the php docs for a more detailed explanation of all functions.

Usage:

{{ "This is a simple example."|preg_replace('/simple/', 'beautiful') }}

will output: This is a beautiful example.

##Install:

  1. Move the twigpcre directory into the craft/plugins/ directory.
  2. Go to Settings -> Plugins and enable 'Twig PCRE Filters'.

About

Twig PCRE Filters for Craft CMS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages