in reply to Re: Re: reg ex help
in thread reg ex help
My original question to try and match it in one reg exp was to have the code in one expect perl line:$session1->expect(30, '-re', qr'^0000:.*\r\n'); my $tmpvar = $session1->match(); my $tmpvar1 = (split (/ +/, $tmpvar))[14]; unless($tmpvar1 eq 'A6') { &snmp_conf_cleanup(); &clean_up_and_exit($session,"FAIL",$mesg,"did not receive any +v2 notifications"); }
I would still like to do that but at least now I have it working. Thanks for everyone's help here.$session1->expect(30, '-re', qr'REGEX HERE');
|
|---|