Skip to content

Commit

Permalink
Improve regex again
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamantcheese committed Aug 27, 2019
1 parent 08e3b68 commit 5a447c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class CommentParserHelper {
.linkTypes(EnumSet.of(LinkType.URL))
.build();

private static Pattern youtubeLinkPattern = Pattern.compile("\\b(?:https?://)?(?:www\\.)?youtu\\.?be(?:\\.com)?.*?(?:watch|embed)?(?:.*?v=|v/|/)([\\w\\-]+)&?(?:\\?t=\\d+)?\\b");
private static Pattern youtubeLinkPattern = Pattern.compile("\\b(?:https?://)?(?:www\\.)?youtu\\.?be(?:\\.com)?.*?(?:watch|embed)?(?:.*?v=|v/|/)([\\w\\-]+)&?(?:\\?t=\\d+)?(?:#[\\w|=]*)?\\b");
private static final String API_KEY = "AIzaSyB5_zaen_-46Uhz1xGR-lz1YoUMHqCD6CE";
private static Bitmap youtubeIcon = BitmapFactory.decodeResource(AndroidUtils.getRes(), R.drawable.youtube_icon);

Expand Down

0 comments on commit 5a447c6

Please sign in to comment.