code: def _compileRegExp(string, insensitive, minimal):
          
          flags = 0
          if insensitive:
              flags = re.IGNORECASE
  
          string = string.replace('[_[:alnum:]]', '[\\w\\d]') # ad-hoc fix for C++ parser
          string = string.replace('[:digit:]', '\\d')
          string = string.replace('[:blank:]', '\\s')
  
          try:
              return re.compile(string, flags)
          except (re.error, AssertionError) as ex:
              _logger.warning("Invalid pattern '%s': %s", string, str(ex))
              return None
docs: Compile regular expression.
          Python function, used by C code
  
          NOTE minimal flag is not supported here, but supported on PCRE