Well, technically it's legal to import prescription meds for your own or your household's use - as long as it's not stupid amounts (more than about 3 months worth) which could get you done for dealing. Vet meds are treating more striclty and if you import a brand that is not licensed in the UK (even if the ingredients are exaclty the same as one that is), Customs will seize it (if they notice).
Actually anything that is controlled - such as benzodiazepines - are not legal to import even with a so-called prescription and will be seized if customs happens to find yours. As far as prosecuting anyone for it, that is highly highly unlikely unless, as other folks said, you are purchasing amounts that indicate possible distribution.
There is no way they're going to make a case, due to the cost, to prosecute someone for a couple hundred xanax. However the biggest thing you should ALWAYS remember is that if law enforcement ever were to come to your door you absolutely must not talk to them. All you do is say you're uncomfortable talking to law enforcement without a lawyer present. And stick to that. The one person I know who was prosecuted over some pain medicine (got some probation) made the mistake of admitting to purchasing them. Even this person's own public defender told them that if not admitted to, no case would've been made.