If you really need to search for code constructs that can span multiple lines (but not always do) then Treesitter-aware tools like ast-grep and gritql are superior.
$ rg 'sear' -r 'repl' file.txtEdit: Oh, it's you. Thanks for a brilliant tool, I use it every workday and have been for years.