How to handle re.error exceptions when parsing user-provided regex in argparse?