awk: split a file using a string problems

Hi,

if i use this code

awk '/String/{n++}{print > f n}' f=file  input

I get "input" splited this way

file1
String
1515
1354
2356

file 2
String
4531
0345
5345

etc

and the files are name like this file1, file2....file10...file125

Is posible to:

1) exclud "String" from the output files and get something like this

file1
1515
1354
2356

file2
4531
0345
5345

2) is posible to name the files like this file001, file002....file010...file125 (i know i could renumber the files, but i would like a more straightforward method)

thanks in advance!

Something like this?

awk '/String/{n++;next}{print > f sprintf("%03d", n)}' f=file  input

so you need to rename the files and remove the second line? is filexxx part of the file content too?

Thanks very much Franklin52, your code do the all work perfectly!

 		 		Funksen: I want to avoid renaming files and the filexxx part is not part of the content. Franklin52� code is wath I was lookin for.