- or download this
perl -wle '$foo = "a hello w"; $foo = $foo =~ s/(?=.*(hello)).*/$1/sr;
+ print $foo'
- or download this
hello
- or download this
...; print $foo =~ s/(?=.*(hello)).*/$1/sr;
- or download this
...; $foo =~ /hello(?{ $foo = $& })/; print $foo