We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0fae32 commit 96c1fb2Copy full SHA for 96c1fb2
1 file changed
src/parser.rs
@@ -4,15 +4,7 @@ use regex::Regex;
4
pub fn is_tiktok_url(message: &str) -> bool {
5
lazy_static! {
6
static ref RE: Regex = Regex::new(
7
- r"(?ix)^https?://
8
- (?:www\.|m\.|vm\.)? # Subdomain
9
- tiktok\.com/
10
- (?: # Path options:
11
- @[\w-]+/video/\d+ # Standard format with video
12
- | t/\d+ # Format with /t/
13
- | \w+ # Short ID for VM
14
- )
15
- /?$ # Optional finishing slash"
+ r"(?ix)^(https?://)?\w{2,3}\.tiktok\.com/.+"
16
).unwrap();
17
}
18
RE.is_match(message)
0 commit comments