Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f49e120

Browse filesBrowse files
authored
Merge pull request #7846 from frendsick/fix/expr-regex-option-singleline
expr: Fix regex anchor matching behavior with `REGEX_OPTION_SINGLELINE`
2 parents ed0492a + c6e2f9f commit f49e120
Copy full SHA for f49e120

File tree

2 files changed

+1
-2
lines changed
Filter options

2 files changed

+1
-2
lines changed

‎src/uu/expr/src/syntax_tree.rs

Copy file name to clipboardExpand all lines: src/uu/expr/src/syntax_tree.rs
+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl StringOp {
178178

179179
let re = Regex::with_options(
180180
&re_string,
181-
RegexOptions::REGEX_OPTION_NONE,
181+
RegexOptions::REGEX_OPTION_SINGLELINE,
182182
Syntax::grep(),
183183
)
184184
.map_err(|_| ExprError::InvalidRegexExpression)?;

‎tests/by-util/test_expr.rs

Copy file name to clipboardExpand all lines: tests/by-util/test_expr.rs
-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,6 @@ mod gnu_expr {
642642
.stdout_only("1\n");
643643
}
644644

645-
#[ignore]
646645
#[test]
647646
fn test_anchor() {
648647
new_ucmd!()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.