Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 254 Bytes

preg_get.md

File metadata and controls

9 lines (6 loc) · 254 Bytes

preg_get

preg_get(pattern, group = 0) is a Twig filter to perform a regular expression match and returns the matched group.

First name: {{ client.fullname|preg_get('/^\S+/') }}

Source: Jasny