my $pattern= "([,|:>] | \\]\\[ | _\\|_)"; my @splitted= split /$pattern/x, $text;