Remove unnecessary non-capturing groups.

This commit is contained in:
Kavin 2023-03-25 15:53:25 +00:00
parent 86f5b67f2f
commit 73717f6f37
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -27,7 +27,7 @@ async fn main() -> std::io::Result<()> {
}.run().await
}
static RE_DOMAIN: Lazy<Regex> = Lazy::new(|| Regex::new(r"^(?:[a-z\d.-]*\.)?((?:[a-z\d-]*)\.(?:[a-z\d-]*))$").unwrap());
static RE_DOMAIN: Lazy<Regex> = Lazy::new(|| Regex::new(r"^(?:[a-z\d.-]*\.)?([a-z\d-]*\.[a-z\d-]*)$").unwrap());
static RE_MANIFEST: Lazy<Regex> = Lazy::new(|| Regex::new("(?m)URI=\"([^\"]+)\"").unwrap());
static RE_DASH_MANIFEST: Lazy<Regex> = Lazy::new(|| Regex::new("BaseURL>(https://[^<]+)</BaseURL").unwrap());