#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11112671 use warnings; my $string = 'aaa, bbb, ccc,ddddd;eee-12345abc Qwerty'; my @a; $string =~ m{ (?