diff --git a/custom_formats/B&W.yml b/custom_formats/B&W.yml index 644ed3c..7ccc82f 100644 --- a/custom_formats/B&W.yml +++ b/custom_formats/B&W.yml @@ -1,5 +1,5 @@ name: B&W -description: Matches the 'B&W' Regex Pattern +description: Matches the 'B&W' and 'Colour' Regex Pattern tags: - Unwanted - Colour Grade @@ -10,4 +10,27 @@ conditions: pattern: B&W required: true type: release_title -tests: [] +- name: Colour + negate: true + pattern: Colour + required: true + type: release_title +tests: +- conditionResults: + - matches: true + name: B&W + negate: false + pattern: B&W + required: true + type: release_title + - matches: true + name: Colour + negate: true + pattern: Colour + required: true + type: release_title + expected: false + id: 1 + input: Dracula (1931) B&W (Colourized Version) + lastRun: '2025-02-13T13:14:54.830866' + passes: true diff --git a/regex_patterns/B&W.yml b/regex_patterns/B&W.yml index 3d652c4..3229925 100644 --- a/regex_patterns/B&W.yml +++ b/regex_patterns/B&W.yml @@ -1,6 +1,10 @@ name: B&W -pattern: (?i)\bblack\s*[.-]?\s*(?:and|&)\s*[.-]?\s*white\b -description: Black and White colour grading. +pattern: \d{4}.*?\bblack\b[\s.]*(?:and|\&|-|\/)?[\s.]*\bwhite\b|\bb\&?w\b +description: Black and White colour grading. This regex matches a 4-digit number (optionally + surrounded by parentheses), followed by any amount of text, and then detects references + to "black and white" in various formats. It supports `blackwhite` (no spaces), `black + and white`, `black-white`, "`black & white`, `black/white`, as well as shorthand + `BW` and `B&W`, while excluding invalid variations like `b w`, `b-w`, or `b/w` tags: - Enhancement - Unwanted @@ -10,41 +14,83 @@ tests: id: 1 input: The Mist Black and White 2007 2160p USA UHD Blu-ray DV HDR HEVC TrueHD 7.1 Atmos-BeyondHD - lastRun: '2024-12-13T07:08:12.829611' - matchSpan: - end: 24 - start: 9 - matchedContent: Black and White + lastRun: '2025-02-14T14:41:22.957835' + matchSpan: null + matchedContent: null matchedGroups: [] - passes: true + passes: false - expected: false id: 2 input: Black and White 2002 1080p Blu-ray AVC DTS-HD MA 5.1-CultFilms - lastRun: '2024-12-13T07:08:12.829611' - matchSpan: - end: 15 - start: 0 - matchedContent: Black and White + lastRun: '2025-02-14T14:41:22.957835' + matchSpan: null + matchedContent: null matchedGroups: [] - passes: false + passes: true - expected: false id: 3 input: 'Pokemon the Movie: Black and White-Victini and Reshiram Zekrom 2011 1080p AUS BD50 DTS-HD MA 5.1 AVC-PHOENiX' - lastRun: '2024-12-13T07:08:12.829611' - matchSpan: - end: 34 - start: 19 - matchedContent: Black and White + lastRun: '2025-02-14T14:41:22.957835' + matchSpan: null + matchedContent: null matchedGroups: [] - passes: false + passes: true - expected: true id: 4 input: Madeo 2009 Black & White Version 1080p JPN Blu-ray AVC TrueHD 5.1-kyRLS - lastRun: '2024-12-13T07:08:12.829611' + lastRun: '2025-02-14T14:41:22.957835' matchSpan: end: 24 - start: 11 - matchedContent: Black & White + start: 6 + matchedContent: 2009 Black & White + matchedGroups: [] + passes: true +- expected: true + id: 6 + input: Psycho (1960) B&W + lastRun: '2025-02-14T14:41:22.957835' + matchSpan: + end: 17 + start: 7 + matchedContent: (1960) B&W + matchedGroups: [] + passes: true +- expected: true + id: 7 + input: Citizen Kane (1941) Black.and.White + lastRun: '2025-02-14T14:41:22.957835' + matchSpan: + end: 35 + start: 13 + matchedContent: (1941) Black.and.White + matchedGroups: [] + passes: true +- expected: true + id: 8 + input: Dracula (1931) Black-White + lastRun: '2025-02-14T14:41:22.957835' + matchSpan: + end: 26 + start: 8 + matchedContent: (1931) Black-White + matchedGroups: [] + passes: true +- expected: true + id: 11 + input: Young Frankenstein (1974) BW DVDRip + lastRun: '2025-02-14T14:41:22.957835' + matchSpan: + end: 28 + start: 19 + matchedContent: (1974) BW + matchedGroups: [] + passes: true +- expected: false + id: 12 + input: Jack Black & Betty White in a Comedy Special + lastRun: '2025-02-14T14:41:22.957835' + matchSpan: null + matchedContent: null matchedGroups: [] passes: true diff --git a/regex_patterns/Colour.yml b/regex_patterns/Colour.yml new file mode 100644 index 0000000..84d0c12 --- /dev/null +++ b/regex_patterns/Colour.yml @@ -0,0 +1,72 @@ +name: Colour +pattern: \bcolou?r(i[sz]ed?|ed)?\b +description: '- Matches `colour`, `coloured`, `colourize`, `colourized`. + + - Handles both American ("color") and British ("colour") spellings.' +tags: +- Colour Grade +- Enhancement +tests: +- expected: true + id: 1 + input: colour + lastRun: '2025-02-13T13:29:13.301346' + matchSpan: + end: 6 + start: 0 + matchedContent: colour + matchedGroups: + - null + passes: true +- expected: true + id: 3 + input: coloured + lastRun: '2025-02-13T13:29:13.301346' + matchSpan: + end: 8 + start: 0 + matchedContent: coloured + matchedGroups: + - ed + passes: true +- expected: true + id: 4 + input: colourize + lastRun: '2025-02-13T13:29:13.301346' + matchSpan: + end: 9 + start: 0 + matchedContent: colourize + matchedGroups: + - ize + passes: true +- expected: true + id: 7 + input: colourized + lastRun: '2025-02-13T13:29:13.301346' + matchSpan: + end: 10 + start: 0 + matchedContent: colourized + matchedGroups: + - ized + passes: true +- expected: true + id: 8 + input: colored + lastRun: '2025-02-13T13:29:13.301346' + matchSpan: + end: 7 + start: 0 + matchedContent: colored + matchedGroups: + - ed + passes: true +- expected: false + id: 9 + input: discolor + lastRun: '2025-02-13T13:29:13.301346' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true