Lines Matching +full:- +full:replace

1 macro_rules! replace(  macro
3 $search:expr, $replace:expr, $result:expr) => (
7 assert_eq!(re.$which(text!($search), $replace), text!($result));
12 replace!(first, replace, r"[0-9]", "age: 26", t!("Z"), "age: Z6");
13 replace!(plus, replace, r"[0-9]+", "age: 26", t!("Z"), "age: Z");
14 replace!(all, replace_all, r"[0-9]", "age: 26", t!("Z"), "age: ZZ");
15 replace!(
17 replace,
18 r"(?-u)(\S+)\s+(\S+)",
23 replace!(
25 replace,
26 r"(?-u)(\S+)\s+(\S+)",
31 // replace!(adjacent_index, replace,
33 replace!(
36 r"(?-u)(?P<first>\S+)\s+(?P<last>\S+)(?P<space>\s*)",
41 replace!(
49 replace!(number_hypen, replace, r"(.)(.)", "ab", t!("$1-$2"), "a-b");
50 // replace!(number_underscore, replace, r"(.)(.)", "ab", t!("$1_$2"), "a_b");
51 replace!(
54 r"(?-u)(\w) (\w)",
59 replace!(
62 r"(?-u)(\w+) (\w+)",
67 replace!(
70 r"(?-u)(\w+) (\w+)",
75 replace!(
77 replace,
78 r"(?-u)(\S+)\s+(\S+)",
83 replace!(
85 replace,
86 r"(?-u)(\S+)\s+(\S+)",
92 replace!(
94 replace,
95 r"([0-9]+)",
102 replace!(
104 replace,
105 r"[0-9]+",
111 // See https://github.com/rust-lang/regex/issues/314
112 replace!(
121 // See https://github.com/rust-lang/regex/issues/393
122 replace!(single_empty_match, replace, r"^", "bar", t!("foo"), "foobar");
124 // See https://github.com/rust-lang/regex/issues/399
125 replace!(
134 replace!(
136 replace,
137 r"[0-9]",
142 replace!(
144 replace,
145 r"[0-9]",
150 replace!(
152 replace,
153 r"[0-9]",
158 replace!(
160 replace,
161 r"[0-9]",
166 replace!(
168 replace,
169 r"[0-9]",
174 replace!(
176 replace,
177 r"[0-9]",
183 replace!(
185 replace,
186 r"[0-9]",
191 replace!(
193 replace,
194 r"[0-9]",
199 replace!(
201 replace,
202 r"[0-9]",
207 replace!(
209 replace,
210 r"[0-9]",
215 replace!(
217 replace,
218 r"[0-9]",
223 replace!(
225 replace,
226 r"[0-9]",