How to extract text from textbox?

Hi, i have a doubt. Can I extract text from a string (like a substring) but delimited by a break or space? It was saved at textbox. Anyone have an example?
Thanks!