Skip to content

Commit

Permalink
sub/dub regex
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed Jan 23, 2024
1 parent 79cff1e commit ab03898
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class AnimeNameAdapter {
const val failedEpisodeNumberRegex =
"(?<!part\\s)\\b(\\d+)\\b"
const val seasonRegex = "\\s+(season|s)[\\s:.\\-]*(\\d+)[\\s:.\\-]*"
const val subdubRegex = "(sub|dub|softsub)(bed){0,1}\\s*"

fun findSeasonNumber(text: String): Int? {
val seasonPattern: Pattern = Pattern.compile(seasonRegex, Pattern.CASE_INSENSITIVE)
Expand Down

0 comments on commit ab03898

Please sign in to comment.