Fix for regex validate issue

This addresses an issue with regex validation not working 2nd time around.