Added regex switch to switch regex processing on and off