Multiline matches with ripgrep (rg)
You can simply click the title of this blog to check the reference.
The key is the dotall modifier (?s)
. It helped out me today!
by the way, my final match expression is
rg --pcre2 -U '(?s)\.Initialise\([^,]+,\s*([^,]+),\s*\1(?:,true|false)?\);'
rg is a so fast and so powerful tool in my daily use, I love it!