how to do a preg_replace in twig
The best way is to move the logic from template to the controller.
If you need preg_replace in twig you must create custom extension.
The best way is to move the logic from template to the controller.
If you need preg_replace in twig you must create custom extension.