I have incoming messages from a socket client going into a rich text box. Is there a way to find a part of a string and then extract x amount of characters out of that line into a variable?

Example:

I send a <T> command to the unit
I send a <V> command to the unit

the unit responds into the RTB
<TXXXX>
<VXXXX>

(XXXX could be any combination of numbers)

I need to get the TXXXX and put it in 1 variable and put the VXXXX into another variable.