im trying to copy the lines until an empty line is detected but this code lags my computer i dont know what im doing wrong it is because im running while loop inside another while loop? here is my code:
ElseIf String.Compare(line, "the") = 1 And Not line.ToLower().Contains("by") Then
While True
Dim title = New Regex("^\s*$").Matches(line).Count
If title = 1 Then Exit While
builder.AppendLine(line)
builder.AppendLine(reader.ReadLine())
End While
String.IsNullOrEmpty()orString.IsNullOrWhiteSpace()methods instead of the RegEx. Just like Chris mentioned on his edit.