Added error checking and reporting code
Disable regex input textbox and pushbutton if error occured