From: Matt Z. <mzagrabe@d.umn.edu> - 2010-06-17 11:51:15
|
On Fri, 2010-06-11 at 12:52 -0600, Tom Hall wrote: > How do I do a case insensitive match like with the ‘-nocase’ flag with > expect ? $exp->expect($timeout, [ qr/regex1/ => sub { my $exp = shift; $exp->send("response\n"); exp_continue; } ], [ "regexp2" , \&callback, @cbparms ], ); In perl, you use the 'i' flag with your regexes: "What" =~ /what/ # does not match "What" =~ /what/i # does match HTH, -- Matt Zagrabelny - mzagrabe@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems & Services PGP key 4096R/42A00942 2009-12-16 Fingerprint: 5814 2CCE 2383 2991 83FF C899 07E2 BFA8 42A0 0942 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot |