in reply to Re: Capturing the nth word in a stringin thread Capturing the nth word in a string
my ($nth) = $str =~ /(?:\w+\W+){3}(\w+)/; # capture 4th word [download]