From 86ce5e7e8c8379ef3af8d9a42cecab2c4a771970 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 25 Jan 2017 20:14:54 +0800 Subject: [PATCH] More general grepTheTvdbId() --- source/net/filebot/media/MediaDetection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index 2bf7b73c..ce7ab33f 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -1276,7 +1276,7 @@ public class MediaDetection { public static List grepTheTvdbId(CharSequence text) { // scan for thetvdb id patterns like http://www.thetvdb.com/?tab=series&id=78874&lid=14 - Pattern tvdbUrl = Pattern.compile("\\w+://(?:\\w+[.])?thetvdb.com/[?]tab=\\w+&id=(\\d+)", Pattern.CASE_INSENSITIVE); + Pattern tvdbUrl = Pattern.compile("thetvdb.com[\\p{Graph}]*?[\\p{Punct}]id=(\\d+)", Pattern.CASE_INSENSITIVE); return streamMatches(text, tvdbUrl, m -> m.group(1)).map(Integer::new).collect(toList()); }