use feature qw/say/; use strict; use warnings; my $string = "afdhauio af ad a reason one reason two 1 2 3's reason for,reason7,reason8 ejroapjr"; $string =~ m/ (?:reason.*?){2} # Skip the first two reasons (reason.*) # Keep the third and all text after it. $ # To end of string. /x or die "No match.\n"; say $1;