Ernst, Yehuda wrote: > i want to extract the XXXXX into an array > I totally missed the "into an array" part, sorry. So it's even easier: my @array = $file =~ m/(?<==)(\d+)/g; HTH, ~Y