Is the =~ operator supposed to recognize \n in patterns? Example:
$ a='abc
def'
$ if [[ $a =~ c\nd ]]; then echo ok; fi
The above produces no output (I've tried using \\n, \\\n too), while using a
literal newline works:
$ if [[ $a =~ c$'\n'd ]]; then echo ok; fi
ok
Is that expected behavior or am I doing something wrong? I thought \n was
pretty standard in regular expressions.
Thanks.