The formatting is up to the clan. Clan tags aren't considered part of the name, even though they're all part of the same string. When you register an account, all non-alphanumeric characters will be stripped out and the name will be made case-insensitive.
Say somebody registered the name "John Smith". It would be stored as "johnsmith", and any variation could be used by that player: "JohnSmith", "[joHn sMIth]", "john_smith" etc. J0hnSm1th, however, would be a different name. If John Smith was in Clan John, with the <J> tag, he could just tack it on like "<J>JohnSmith", then when he connected to the account server, the server would search the user name for clan tags and strip them out, in this case, <J>, and use the remaining name, JohnSmith, for the login, then make sure that "johnsmith" actually belonged to the clan with the <J> tag.