// include the latest version of the regex crate in your Cargo.toml
extern crate regex;
use regex::Regex;
fn main() {
let regex = Regex::new(r"(?sm)(^[a-zA-z0-9]{32})").unwrap();
let string = "2629f4a363e64a36bbd86c01dfac5168
ff29ac3148394d1bbbcf85a7d0fd27dd
c627930216bc439db8563451be4d8172
4ed84dd2bb68430e9c4d43884088b364
84ab4c45d2194651bfa6729ad81cdcb9
6fb2f2de90ab45f4976a699099d30697
2d80f4090d0244b4b92ce505874a5f95
f231e374e45a4f2da1b1dc2c6bcb5991
91d13e50695140a7b4d66a28880986ef
3ef3a3990b5e4870840068b500359fca
43fc4ca5d3a544a49aa0fb6d6e28ceb5
48e54b84562a41f98224773a163c3123
be7f7602169844138ef2a9ab66ac38b6
d2f3b5f91512431b86d943c89fa9b8c4
18ecb09cf4b94e4d91ec1b3efa97ea1f
f7ed1df9200543baac16b1e094278f52
f5b54666ccd84b3b905a5092aaf35a48
c6a224f88afe4ebc8943cab7aedd5d21
da180ef24522404598d69e8eb4f071c5
66ae5365d8294605a9cbb6124773d8c4
ba491533d84540e384b4e47280cbdded
d38e9d637dca4d6194ff860187ae9059
9113322aa1404a66ba28732ae59e603b
";
let substitution = "<img src=\"https://vg05.met.vgwort.de/na/$1\" width=\"1\" height=\"1\" alt=\"\">";
// result will be a String with the substituted value
let result = regex.replace_all(string, substitution);
println!("{}", result);
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Rust, please visit: https://docs.rs/regex/latest/regex/