def METHOD_NAME(entry, config, test=False):
    """
    Extract matching files into the directory specified
    Optionally delete the original archive if config.delete_archive is True
    """
    archive = open_archive_entry(entry)
    if not archive:
        return
    to = get_output_path(config['to'], entry)
    for info in archive.infolist():
        if is_match(info, config['regexp']):
            extract_info(info, archive, to, config['keep_dirs'], test=test)
    if config['delete_archive']:
        if not test:
            archive.delete()
        else:
            logger.info(f'Would delete archive {archive.path}')
            archive.close()
    else:
        archive.close()