Unless there's some more definite design or convention for defining what the prefix and suffix are supposed to be, this endeavor is going to smell bad. Perhaps your notion of "prefix-number-suffix" began when there were only file names like "file-01.html" -- but now someone has invented file names like "01-file-01.html", and maybe next month, they'll come up with "01-file-01-new-01.html", "file-01-03-01-new.html", and who knows what else.
Folks here may be able to help more if given a bit more information about your situation.