[feature/twig] Fix begin loop var regex

PHPBB3-11598