I am using regex to find time in a string:
re.match('.*(\d{2}-\d{2} \d{2}:\d{2})', "09-22 13:27")
anyway, this is ok, but if \n exists, this return None:
re.match('.*(\d{2}-\d{2} \d{2}:\d{2})', "\n09-22 13:27")
so why .* can not match \n? and how to deal with this?
.*can not match\n" - because it's not supposed to..matches any symbol but a newline. Usere.Sflag to match a newline with.