Update staples.js

regex caching and comment placeholders for dynamism