in scancode/scanCode.py [0:0]
def read_regex(config):
"""Read the Regular Expressions from the configuration file."""
options_dict = get_config_section_dict(config, SECTION_REGEX)
# vprint("options_dict: " + str(options_dict))
if options_dict is not None:
# each key is a regex string
for pattern in options_dict:
if pattern is not None:
regex_patterns.append(pattern)
else:
raise Exception(ERR_REQUIRED_SECTION % SECTION_REGEX)