Wrap Regex construction in try/catch. This is from user input, so of course we can't assume it will be valid.