refactor generate method regex
Merge pull request #7 from JayDevlin/bug-delete-paddedimage

Refactor generate method regex