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!
David Wei said:
There is a lot of useful information in that site, feel free to subscribe their rss address in your favorite RssReader, their rss address is https://til.hashrocket.com/rss