Team Thanked: 52 mal
Small mistake in the regex, the braces should be outside of the tag.
"#(?P<tag>{PAGE_TEXT_ID_(?P<id>[0-9]+)})#"
should be
"#{(?P<tag>PAGE_TEXT_ID_(?P<id>[0-9]+))}#"
Your tpl IF block should work just fine.