print $str =~ /(John)/; print $str =~ m{ .* / (.+) \. }x; print $str =~ m{ (?: [^/]* / ){5} ( \w+ ) }x;