Hi Matt,<br><br>&gt; hReadUntilStr - that is, a function that takes a Handle as an input<br>&gt; source, a String to match, and a &quot;Num a&quot;&nbsp; as the number of seconds to<br>&gt; wait before returning a (String, Bool) where the String is all the
<br>&gt; text read from the Handle until either matching or timing out and the<br>&gt; Bool is true if the input String was matched<br><br>This might work for you: <a href="http://hpaste.org/289">http://hpaste.org/289</a>
.<br><br>It throws an IO exception if hWaitForChar times out, and makes use of lazy evaluation to schedule all the IO upfront so that grabbing the string prefix can be done in pure code.<br><br>Thanks,<br>Greg<br>