patch 6c43ff2e14364f2547e281a6e97b9ddbe1645f81 Author: Enrique D. Bosch Date: Tue Dec 13 23:21:49 CET 2016 * Simplify regular expressions diff -rN -u old-idlebiff/idlebiff new-idlebiff/idlebiff --- old-idlebiff/idlebiff 2024-11-22 20:26:21.189486964 +0100 +++ new-idlebiff/idlebiff 2024-11-22 20:26:21.189486964 +0100 @@ -192,7 +192,7 @@ if $cap(esearch) \ { set search "SEARCH RETURN (COUNT) $criteria" - set rexpsearch {^\*\s+esearch\s+\(tag\s*[^)]*\)\s+count\s+(.*)$} + set rexpsearch {^\* esearch \(tag [^)]*\) count (.*)$} } \ else \ { @@ -275,17 +275,17 @@ proc ok_tagged linea \ { - return [ regexp -lineanchor -nocase {^A\d+\s+ok.*$} $linea ] + return [ regexp -lineanchor -nocase {^A\d+ ok.*$} $linea ] } proc ok_untagged linea \ { - return [ regexp -lineanchor -nocase {^\*\s+ok.*$} $linea ] + return [ regexp -lineanchor -nocase {^\* ok.*$} $linea ] } proc no_tagged linea \ { - return [ regexp -lineanchor -nocase {^A\d+\s+no.*$} $linea ] + return [ regexp -lineanchor -nocase {^A\d+ no.*$} $linea ] } proc login { con retr } \ @@ -486,7 +486,7 @@ recon $con return -code error } - if [ regexp -lineanchor -nocase {^\*\s+bye .*$} $line ] \ + if [ regexp -lineanchor -nocase {^\* bye(?: .*|$)} $line ] \ { recon $con return -code error