If multi line is an issue, then you can use the flag re.MULTILINE in the regex search ( just a random StackOverflow answer tells you this stackoverflow.com/questions/18521319/re-search-multiple-lines-python ):
or maybe just remove all whitespaces with a first regex and then extract the time with a second.
nah, just ''.join(comment.split()) which performs faster than a regex. Then match for the time string.
@lishadowapps #11 Nah, Mulitiline does something else, it makes '^' and '$' behave different. See docs.python.org/3/library/re.html?highlight=re#re.MULTILINE
Your regex will work as it is. Im just wondering what he wants to do with that time string. He may want to clean it up, in case the time itself is splitted over multiple lines.
You are probably referring to Dotall - docs.python.org/3/library/re.html?highlight=re#re.DOTALL - which makes the '.' also match newlines. But as your regex doesnt use dots it is not needed.
You can't post in the forums yet. Play some games!