Go's re2 syntax document says that the any character (.
) matches any
character, including newline (s=true
). However I wrote a simple program whose
result showed that the any character did not match newline at all. The program
can be found here:
http://play.golang.org/p/pccP52RvKS
Like most other (all?) regex engines, dot does not match newlines unless you
add the "dot all" flag (?s)
to the regex.
I tested this using your link and it worked.
https://golang.org/pkg/regexp/syntax
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With