regex - Regular expression string in java -


i want explain problem command string submitted client server. through specific command have login database managed server. according project's guide lines, command's formatting is: login@username;password. string sent server through socket. user inserts credentials , these sent server putting them command. server has split user , password command , has check, in database, if user exists. here problem, given fact in user , in password can present ; (the same character of separator), don't understand (server side) how can divide user , psw command user , psw same of ones inserted in client.

have got ideas about? thinking use regular expression, right way?

i split string user/pass string this:

string userpass = "user;pass"; string[] parts = userpass.split(";"); string user = parts[0]; string pass = parts[1]; 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -