in reply to Merging multiple variations of a serial number
Could you iterate over each file containing serials and try a regular expression match (and may God help your soul) for the core serial number?
Edit: regex deleted, it didn't work like I thought it did.