Skip to content

Commit

Permalink
Use quantifier instead of multiple conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Nov 28, 2023
1 parent 3d3ac3f commit 2fe6470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TwitchDownloaderCore/Tools/TwitchRegex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class TwitchRegex

public static readonly Regex UrlTimeCode = new(@"(?<=(?:\?|&)t=)\d+h\d+m\d+s(?=$|\?|\s)", RegexOptions.Compiled);
public static readonly Regex BitsRegex = new(
@"(?<=(?:\s|^)(?:4Head|Anon|Bi(?:bleThumb|tBoss)|bday|C(?:h(?:eer|arity)|orgo)|cheerwal|D(?:ansGame|oodleCheer)|EleGiggle|F(?:rankerZ|ailFish)|Goal|H(?:eyGuys|olidayCheer)|K(?:appa|reygasm)|M(?:rDestructoid|uxy)|NotLikeThis|P(?:arty|ride|JSalt)|RIPCheer|S(?:coops|h(?:owLove|amrock)|eemsGood|wiftRage|treamlabs)|TriHard|uni|VoHiYo))[1-9]\d?\d?\d?\d?\d?\d?(?=\s|$)",
@"(?<=(?:\s|^)(?:4Head|Anon|Bi(?:bleThumb|tBoss)|bday|C(?:h(?:eer|arity)|orgo)|cheerwal|D(?:ansGame|oodleCheer)|EleGiggle|F(?:rankerZ|ailFish)|Goal|H(?:eyGuys|olidayCheer)|K(?:appa|reygasm)|M(?:rDestructoid|uxy)|NotLikeThis|P(?:arty|ride|JSalt)|RIPCheer|S(?:coops|h(?:owLove|amrock)|eemsGood|wiftRage|treamlabs)|TriHard|uni|VoHiYo))[1-9]\d{0,6}(?=\s|$)",
RegexOptions.Compiled);

/// <returns>A <see cref="Match"/> of the video's id or <see langword="null"/>.</returns>
Expand Down

0 comments on commit 2fe6470

Please sign in to comment.