You allways get the 4 left chars, in that way if your tag is for example ;LRTB fails because it reads ;LRT

In the main sub you check for separator but not in the functions.