Bug fix in Regex

Removed an unnecessary backwards parantheses, renamed project again
This commit is contained in:
William Batista 2021-02-16 14:55:27 -05:00
parent 41164ac5ba
commit 1a54eedf24
No known key found for this signature in database
GPG Key ID: C6D7973D216F38D3
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "magnet_url" name = "magnet-url"
version = "1.0.0" version = "1.0.1"
authors = ["William Batista <bootlegbilly@protonmail.ch>"] authors = ["William Batista <bootlegbilly@protonmail.ch>"]
license-file = "LICENSE.md" license-file = "LICENSE.md"
description = "A simple, hackable magnet url parser in Rust" description = "A simple, hackable magnet url parser in Rust"

View File

@ -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_SOURCE_RE_STR: &str = r"xs=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\\-]*)(&|$|\s)";
const EXACT_LENGTH_RE_STR: &str = r"xl=(\d*)(&|$|\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 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 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 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 ///# Intro