From 020c096b6b4e1ee20a8fd8015912e8894e917f4c Mon Sep 17 00:00:00 2001 From: Oran Avraham Date: Wed, 26 Nov 2025 00:14:16 +0200 Subject: [PATCH] fix(regex): Match 7.1 only when not surrounded by other digits --- regex_patterns/7.1 Surround.yml | 34 +++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/regex_patterns/7.1 Surround.yml b/regex_patterns/7.1 Surround.yml index ba94ff6..f219e57 100644 --- a/regex_patterns/7.1 Surround.yml +++ b/regex_patterns/7.1 Surround.yml @@ -1,7 +1,37 @@ name: 7.1 Surround -pattern: '7\.1' +pattern: '\D7\.1(\D|$)' description: '' tags: - Audio - Channel -tests: [] +tests: +- expected: true + id: 1 + input: SomeName.TrueHD.7.1-GROUP + lastRun: '2025-11-26T00:12:58.921246' + matchSpan: + end: 20 + start: 15 + matchedContent: .7.1- + matchedGroups: + - '-' + passes: true +- expected: false + id: 2 + input: SomeName.2007.1080p-GROUP + lastRun: '2025-11-26T00:12:58.921246' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: true + id: 3 + input: SomeName.TrueHD.7.1 + lastRun: '2025-11-26T00:12:58.921246' + matchSpan: + end: 19 + start: 15 + matchedContent: .7.1 + matchedGroups: + - '' + passes: true