Skip to content

Commit

Permalink
regex fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed Jan 13, 2024
1 parent ad19795 commit 46b84ff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.regex.Pattern

class AnimeNameAdapter {
companion object {
const val episodeRegex = "(episode|ep|e)[\\s:.\\-]*([\\d]+\\.?[\\d]*)[\\s:.\\-]*\\(\\s*(sub|subbed|dub|dubbed)*\\s*\\)\\s*"
const val episodeRegex = "(episode|ep|e)[\\s:.\\-]*([\\d]+\\.?[\\d]*)[\\s:.\\-]*\\(?\\s*(sub|subbed|dub|dubbed)*\\s*\\)?\\s*"
const val seasonRegex = "(season|s)[\\s:.\\-]*(\\d+)[\\s:.\\-]*"

fun findSeasonNumber(text: String): Int? {
Expand Down

0 comments on commit 46b84ff

Please sign in to comment.