I'm trying to extract a simple sentence from a string delimited with a # character.
str = "#text text text \n text#"
with this pattern
pattern = '#(.+)#'
now, the funny thing is that regular expression isn't matched when the string contains newline character
out = re.findall(pattern, str) # out contains empty []
but if I remove \n from string it works fine.Any idea how to fix this ?