summaryrefslogtreecommitdiffstats
path: root/vendor/regex/tests/replace.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/regex/tests/replace.rs')
-rw-r--r--vendor/regex/tests/replace.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/vendor/regex/tests/replace.rs b/vendor/regex/tests/replace.rs
index d65be072f..f23c57551 100644
--- a/vendor/regex/tests/replace.rs
+++ b/vendor/regex/tests/replace.rs
@@ -15,7 +15,7 @@ replace!(all, replace_all, r"[0-9]", "age: 26", t!("Z"), "age: ZZ");
replace!(
groups,
replace,
- r"(?-u)(\S+)\s+(\S+)",
+ r"([^ ]+)[ ]+([^ ]+)",
"w1 w2",
t!("$2 $1"),
"w2 w1"
@@ -23,7 +23,7 @@ replace!(
replace!(
double_dollar,
replace,
- r"(?-u)(\S+)\s+(\S+)",
+ r"([^ ]+)[ ]+([^ ]+)",
"w1 w2",
t!("$2 $$1"),
"w2 $1"
@@ -33,7 +33,7 @@ replace!(
replace!(
named,
replace_all,
- r"(?-u)(?P<first>\S+)\s+(?P<last>\S+)(?P<space>\s*)",
+ r"(?P<first>[^ ]+)[ ]+(?P<last>[^ ]+)(?P<space>[ ]*)",
"w1 w2 w3 w4",
t!("$last $first$space"),
"w2 w1 w4 w3"
@@ -51,7 +51,7 @@ replace!(number_hypen, replace, r"(.)(.)", "ab", t!("$1-$2"), "a-b");
replace!(
simple_expand,
replace_all,
- r"(?-u)(\w) (\w)",
+ r"([a-z]) ([a-z])",
"a b",
t!("$2 $1"),
"b a"
@@ -59,7 +59,7 @@ replace!(
replace!(
literal_dollar1,
replace_all,
- r"(?-u)(\w+) (\w+)",
+ r"([a-z]+) ([a-z]+)",
"a b",
t!("$$1"),
"$1"
@@ -67,7 +67,7 @@ replace!(
replace!(
literal_dollar2,
replace_all,
- r"(?-u)(\w+) (\w+)",
+ r"([a-z]+) ([a-z]+)",
"a b",
t!("$2 $$c $1"),
"b $c a"
@@ -75,7 +75,7 @@ replace!(
replace!(
no_expand1,
replace,
- r"(?-u)(\S+)\s+(\S+)",
+ r"([^ ]+)[ ]+([^ ]+)",
"w1 w2",
no_expand!("$2 $1"),
"$2 $1"
@@ -83,7 +83,7 @@ replace!(
replace!(
no_expand2,
replace,
- r"(?-u)(\S+)\s+(\S+)",
+ r"([^ ]+)[ ]+([^ ]+)",
"w1 w2",
no_expand!("$$1"),
"$$1"