How do I extract X number of lines from a text box?

I have a text box with text in.

Can someone tell me how I extract X number of lines?
I’ve been through the help files and can’t see how this can be done.

Thanks.

OM