News for hackers. Stuff that matters.
Re:Finding CSV files that start with a BOM using ripgrep by burntsushi on Sunday May 30, 2021 @07:31PM (#27338046)
In this context the "m flag" refers to a flag inside the regex syntax. That is, when you use ripgrep's regex library as a standalone (as Rust programmers do), then '^' only matches at the beginning of text, where as '(?m)^' enables multi-line mode and thus permits to match at either the beginning of text or at the beginning of a line.

ripgrep also has a -U/--multiline flag, but it's orthogonal to the regex mode called multiline. It's an unfortunate naming clash, but they are names in otherwise distinct namespaces.

ripgrep always enables the regex flag 'm', regardless of whether -U/--multiline is enabled or not.

Re:Finding CSV files that start with a BOM using ripgrep by Jehops on Monday May 31, 2021 @08:14AM (#27343257)
Thank you for taking the time to explain!