// 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"(?m)^\$(?P<guid>[\w\d-]+).(.|\n)(?P<nome>.+)..(?P<url>https://[\w\-\.\/]+)..(?P<desc>\w.*)\(.+$").unwrap();
let string = "$1cb07348-34a4-4741-b50f-c41e584370f7TeamSpeak Addon AuthorVhttps://badges-content.teamspeak.com/1cb07348-34a4-4741-b50f-c41e584370f7/addon_author\"Creator of TeamSpeak Addons(ß”Â0·
$50bbdbc8-0f2a-46eb-9808-602225b49627
Gamescom 2016Whttps://badges-content.teamspeak.com/50bbdbc8-0f2a-46eb-9808-602225b49627/gamescom_2016\"Registered during Gamescom 2016(ß”Â0Î
$d95f9901-c42d-4bac-8849-7164fd9e2310Paris Games Week 2016^https://badges-content.teamspeak.com/d95f9901-c42d-4bac-8849-7164fd9e2310/paris_gamesweek_2016\"'Registered during Paris Games Week 2016(ß”Â0³
$62444179-0d99-42ba-a45c-c6b1557d079a
Gamescom 2014Whttps://badges-content.teamspeak.com/62444179-0d99-42ba-a45c-c6b1557d079a/gamescom_2014\"Registered at Gamescom 2014(뿞Æ0Ê
$fa3ece28-64df-431f-b1b3-90844bfdd2d9Paris Games Week 2014^https://badges-content.teamspeak.com/fa3ece28-64df-431f-b1b3-90844bfdd2d9/paris_gamesweek_2014\"#Registered at Paris Games Week 2014(뿞Æ0Ø
$450f81c1-ab41-4211-a338-222fa94ed157\"TeamSpeak Addon Developer (Bronze)]https://badges-content.teamspeak.com/450f81c1-ab41-4211-a338-222fa94ed157/addon_author_bronze\"%Creator of at least 1 TeamSpeak Addon(œòÆ0Ù
$c9e97536-5a2d-4c8e-a135-af404587a472\"TeamSpeak Addon Developer (Silver)]https://badges-content.teamspeak.com/c9e97536-5a2d-4c8e-a135-af404587a472/addon_author_silver\"&Creator of at least 3 TeamSpeak Addons(œòÆ0Õ
$94ec66de-5940-4e38-b002-970df0cf6c94 TeamSpeak Addon Developer (Gold)[https://badges-content.teamspeak.com/94ec66de-5940-4e38-b002-970df0cf6c94/addon_author_gold\"&Creator of at least 5 TeamSpeak Addons(œòÆ0º
$534c9582-ab02-4267-aec6-2d94361daa2a
Gamescom 2017Whttps://badges-content.teamspeak.com/534c9582-ab02-4267-aec6-2d94361daa2a/gamescom_2017\"\"Visited TeamSpeak at Gamescom 2017(;µÌ0µ
$34dbfa8f-bd27-494c-aa08-a312fc0bb240Gamescom Hero 2017Shttps://badges-content.teamspeak.com/34dbfa8f-bd27-494c-aa08-a312fc0bb240/hero_2017\"Gaming Hero at Gamescom 2017(;µÌ0¦";
// result will be an iterator over tuples containing the start and end indices for each match in the string
let result = regex.captures_iter(string);
for mat in result {
println!("{:?}", mat);
}
}
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/