my $string = "hello world"; print $string =~ /^.{@{[!$[]}}(.{${\($]<<$]>>$])}})/; # 'ello '