From 1a54eedf24f094da96e6d59a7d54d7afb78c8438 Mon Sep 17 00:00:00 2001 From: William Batista Date: Tue, 16 Feb 2021 14:55:27 -0500 Subject: [PATCH] Bug fix in Regex Removed an unnecessary backwards parantheses, renamed project again --- Cargo.toml | 4 ++-- src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fdadbee..1ceca2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "magnet_url" -version = "1.0.0" +name = "magnet-url" +version = "1.0.1" authors = ["William Batista "] license-file = "LICENSE.md" description = "A simple, hackable magnet url parser in Rust" diff --git a/src/lib.rs b/src/lib.rs index 4b1bb87..99c4a64 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,8 +11,8 @@ const KEYWORD_TOPIC_RE_STR: &str = r"kt=([A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\{}\-]*) const EXACT_SOURCE_RE_STR: &str = r"xs=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\\-]*)(&|$|\s)"; const EXACT_LENGTH_RE_STR: &str = r"xl=(\d*)(&|$|\s)"; const WEB_SEED_RE_STR: &str = r"ws=([A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\{}\-]*)(&|$|\s)"; -const ACCEPTABLE_SOURCE_RE_STR: &str = r"as=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\\-]*)(&|$|\s))"; -const MANIFEST_TOPIC_RE_STR: &str = r"mt=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\\-]*|urn:(sha1|btih|ed2k|aich|kzhash|md5|tree:tiger):([A-Fa-f0-9]+|[A-Za-z2-7]+))(&|$|\s))"; +const ACCEPTABLE_SOURCE_RE_STR: &str = r"as=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\\-]*)(&|$|\s)"; +const MANIFEST_TOPIC_RE_STR: &str = r"mt=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\\-]*|urn:(sha1|btih|ed2k|aich|kzhash|md5|tree:tiger):([A-Fa-f0-9]+|[A-Za-z2-7]+))(&|$|\s)"; ///# Intro