Test, validate and match regular expressions
Matches Twig template translation blocks in Symfony, capturing both the tag variant ({% trans %}, {% transchoice %}, or {% trans with {...} %}) and the translatable content between the opening tag and its {% endtrans %} or {% endtranschoice %} counterpart. With the global flag enabled, it extracts all translation blocks throughout a template. Ideal for internationalization (i18n) tooling and translation string extraction from Twig templates.