The main part of the code, based on your original sketch, should look like this:
// Read all the lines of the reply from server and print them to Serial
while (client.available()) {
String line = client.readStringUntil('\r');
int start_loc = find_text("<b>", line, 0);
int end_loc = find_text("</b>", line, 0);
if (start_loc > 0 && end_loc > 0)
{
lcd.clear();
Serial.println("data: ");
lcd.print("data: ");
lcd.setCursor(1, 1);
// dump line read to lcd. scroll if necessary . . .
if ( line.length() <= 16 ) {
Serial.println( line ) ;
lcd.print( line ) ;
}
else {
for ( int i = 0 ; i <= line.length() - 16 ; i++ ) {
Serial.println( line.substring( i, i + 16 ) ) ;
lcd.print( line.substring( i, i + 16 ) ) ;
delay( 500 ) ;
}
}
}
Serial.println();
Serial.println("closing connection");
delay(2000);
}