1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

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
commit f49e120877
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -178,7 +178,7 @@ impl StringOp {
let re = Regex::with_options( let re = Regex::with_options(
&re_string, &re_string,
RegexOptions::REGEX_OPTION_NONE, RegexOptions::REGEX_OPTION_SINGLELINE,
Syntax::grep(), Syntax::grep(),
) )
.map_err(|_| ExprError::InvalidRegexExpression)?; .map_err(|_| ExprError::InvalidRegexExpression)?;

View file

@ -642,7 +642,6 @@ mod gnu_expr {
.stdout_only("1\n"); .stdout_only("1\n");
} }
#[ignore]
#[test] #[test]
fn test_anchor() { fn test_anchor() {
new_ucmd!() new_ucmd!()