Win8 Strawberry 5.8.9.5 (32) Thu 12/17/2020 21:09:41 C:\@Work\Perl\monks >perl -Mstrict -Mwarnings -MData::Dump=dd my $s = " info John 100 - 2000 Kent"; my $word = ''; while ($s =~ m{ $word [^[:alnum:]]+ ([[:alnum:]]+) }xms) { print "next word after '$word' is '$1' \n"; $word = $1; } print "another way \n"; my @words = $s =~ m{ [[:alnum:]]+ }xmsg; dd \@words; ^Z next word after '' is 'info' next word after 'info' is 'John' next word after 'John' is '100' next word after '100' is '2000' next word after '2000' is 'Kent' another way ["info", "John", 100, 2000, "Kent"]