First of all you must split the TextBox text into separate lines.
When you watch the TextBox text property with the debugger,
you will see that it actually is like this:
http://www.page.1.com/page.2/page.3
\r\nwww.home.page.net/about.page"...
The linebreaks are
\r\n
You get the lines like this
var lines = Regex.Split(textBox.Text, "\r\n");
Now you must loop through the lines and get the first part of any URL by using String.Split:
var newLines = new List<string>();
foreach (var line in lines)
{
var firstChunk = line.Split('/')[0];
newLines.Add(firstChunk);
}
Finally you must join the lines with the linebreaks.
textBox.Text = string.Join("\r\n", newLines);