chickadee » scan-input-lines » scan-input-lines

scan-input-lines REGEXP #!optional PORTprocedure

Reads lines from PORT (defaults to the result of (current-input-port)) using read-line and returns the result of (irregex-search REGEXP LINE), if the match succeeds. If no match could be found, #f is returned.

REGEXP may also be a procedure of one argument which is called for each input line and should return a non-false value on success, which will then be the result of the call to scan-input-lines.