RGi...@a1... writes:
[eravin wrote]
> > I don't like deleting the anchoring to the beginning of the line,
> > since it might get an accidental match with comments or other
> arbitrary
> > strings in the router's config.
>
> Then how about anchoring it to the end of buffer ("\Z")? The prompt
> should be the *last* output, right?
It should be, but there's the pathological case where
there's the accidental match exists *AND* that pattern happens to show
up at the end of a packet *AND* there's a delay before the next
packet. In which case, the pattern would be at the end of the
accumulator and expect() would be fooled. Not a very likely case,
but it could still happen (and most certainly WILL happen if I
used \Z that way, probably three times a day :-).
But thanks for the reminder about \Z, I had forgotten about it.
-- Ed
|