The regexp for validating an e-mail address is defined in /includes/functions.php, function get_preg_expression($mode):This works as intended and using it in the native BBCode works flawless - e-mail addresses are recognized, hence the BBCode is accepted:
When defining a custom BBCode you also have the option to use EMAIL as a token. However, you're unable to imitate the native e-mail BBCode which accepts the address as a parameter. As example: defining this will work, but using that BBCode in your posts will never be recognized/accepted:
The reason for this is that the regexp for the e-mail address captures the subpatterns. After defining every subpattern to not be captured and re-submitting my custom BBCode in the ACP again (thus updating the database rowset) my very own BBCode also works like the native EMAIL BBcode with a parameter.
The correct regexp:
Found while analyzing https://www.phpbb.com/community/viewtopic.php?f=71&t=2164409