Test, validate and match regular expressions
This pattern matches four alternatives: opening `[trx...]` and closing `[/trx...]` shortcode tags (commonly used by ThemeREX WordPress themes), `<a ...>` anchor tags, and `<img ...>` tags immediately followed by another HTML tag. With the global flag, it scans full content to locate or filter out shortcodes alongside specific HTML elements like links and images, e.g. when cleaning or processing post markup. Note the trailing dot matches any character rather than strictly the closing `]` or `>`.