def recursive_dir_match(folder_path, regex='<STR_LIT>'):
outlist = []<EOL>for root, dirs, files in os.walk(folder_path):<EOL><INDENT>outlist.extend([op.join(root, f) for f in dirs<EOL>if re.match(regex, f)])<EOL><DEDENT>return outlist<EOL>
Returns absolute paths of folders that match the regex within folder_path and
all its children folders.

Note: The regex matching is done using the match function
of the re module.

Parameters
----------
folder_path: string

regex: string

Returns
-------
A list of strings.