[Trilug-ontopic] YAEQ (yet another Expect question)

Michael Peters mpeters at plusthree.com
Wed Jan 20 15:12:41 EST 2010

On 01/20/2010 03:02 PM, Greg Brown wrote:

>     my($which, $why, $match, $before, $after) = $ssh->expect(30,"greg*:");

This regular expression doesn't mean "greg"-followed-by-anything. It 
means "greg"-followed-by-0-or-more-"g". So it matches greg, gregg, 
greggg, etc.

You need it to be "greg.*:".

Btw, this is same in just about any regular expression implementation 
(Python, Perl, etc).

>  Any ideas?  I'd really like to get this working.

Just a thought that you might get more helpful responses if you don't 
first bash the technology before asking for help (that's how I 
interpreted the "I don't have time to learn python" comment).

Michael Peters
Plus Three, LP

More information about the Trilug-ontopic mailing list