make regular expression for twig doc block more secure