How to match beginning of string or character in Python,"float(re.findall('(?:^|_)' + par + '(\\d+\\.\\d*)', dir)[0])"