Extract string Service SMS

Hello Friends
Someone knows how to extract a string of SMS service.
example:
1. The application receives an SMS (contains-date, number, name), remove the chain I need to insert code in a field of APP

I need that solution in Java.