Upgrades to regex_scratch.py utility script