I am developing a client/server application.
How can I parse a string (message from client) to match with my required string pattern.
Let say my pattern required is:

RESULT Acct. Number Year Part
Sample: RESULT 1063-12 2012 1st

I need to check incoming message if it is in correct format. if not correct my server will reply a correction message.
Server must accept correct format of message only. Coz strings from message is use to query my database for reply of result.

I have no initial code for now here. Im just wondering an idea now how to do it in a code.

I'm thinking if it is best to use regex split or match.

Anyone have sample of working code using regex?
Im also googling it now.

Thanks.