I want to explain my problem about a command string submitted from the client to the server. Through this specific command I have to login into the database managed by the server. According to the project's guide lines, command's formatting is: login@username;password. The string is sent to the server through a socket. User inserts his credentials and these are sent to the server putting them into the command. The server has to split the user and the password from the command and has to check, in the database, if the user already exists. Here is my problem, given the fact that in the user and in the password can be present ; (the same character of the separator), I don't understand (server side) how can i divide user and psw from the command so that user and psw are the same of the ones inserted in the client. 

Have you got some ideas about? I was thinking to use regular expression, is this the right way?