I have a python code like below: My question is why the matched variable is [\' \']? (I used the regex in regexpal.com, it can find the right result |Name=A. Johnson | there)
matched = re.findall("\|?\s*[nN]ame\s*=([a-zA-Z\.\s]+)\|?",a,re.I) print matched
output:
['A. Johnson ']