Unzip "path/to/test/file.gz" to standard output and save all lines matching "my regex" to files with a 1000000 limit
gzip -cd path/to/test/file.gz | awk 'BEGIN{global=1}/my regex/{count+=1;print $0 >"part"global".txt";if (count==1000000){count=0;global+=1}}'