Merge pull request #7846 from frendsick/fix/expr-regex-option-singleline

expr: Fix regex anchor matching behavior with `REGEX_OPTION_SINGLELINE`
This commit is contained in:
Dorian Péron
2025-05-02 13:35:10 +02:00
committed by GitHub
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ impl StringOp {
let re = Regex::with_options(
&re_string,
RegexOptions::REGEX_OPTION_NONE,
RegexOptions::REGEX_OPTION_SINGLELINE,
Syntax::grep(),
)
.map_err(|_| ExprError::InvalidRegexExpression)?;
-1
View File
@@ -642,7 +642,6 @@ mod gnu_expr {
.stdout_only("1\n");
}
#[ignore]
#[test]
fn test_anchor() {
new_ucmd!()