Tweaked regex for stricter matching.
Restructure code to not run at all if no regex match.