perl -le '$re = "(hello)"; $_ = "Hello world"; print $1 if /$re/i;'