I have a textbox that I break up into an array based on "\r"

I'd like to have the line of text that is clicked on put into a string.

For instance, if I click on the 2nd line below in my textbox, I'd like "2nd line" to be entered into the string

> 
> 1st line  
> 
>  2nd line  
> 
>  last line
> 
> 
> 

How would I go about doing that?