Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for twig extensions preg_split / preg_match #762

Merged
merged 4 commits into from
Feb 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pages/03.themes/04.twig-filters-functions/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,18 @@ Converts a string to the English plural version

`'person'|pluralize` <i class="fa fa-long-arrow-right"></i> **{{ 'person'|pluralize }}**

[version=17]
#### Preg Match

Wrapper for PHP [preg_match()](https://www.php.net/manual/en/function.preg-match.php) that matches a text by a pattern given as regular expression. Returns the matche(s) if there is at least one accordance or `false` if not.
[/version]

[version=17]
#### Preg Split

Wrapper for PHP [preg_split()](https://www.php.net/manual/en/function.preg-split.php) that splits a text by a pattern given as regular expression.
[/version]

[version=16]
#### Print Variable

Expand Down