diff --git a/utils/spielplan-filter.js b/utils/spielplan-filter.js index 85ea2f0..20462c2 100644 --- a/utils/spielplan-filter.js +++ b/utils/spielplan-filter.js @@ -66,8 +66,8 @@ function parseJugendTeamKey(teamKey) { function sideMatchesJugendTeam({ isHarheimer, ageClass, teamNumber }, team) { if (!isHarheimer) return false - const agePattern = new RegExp(`(?:jugend\\s*|j)${team.age}\\b`, 'i') - if (!agePattern.test(ageClass)) return false + const ageMatch = String(ageClass || '').match(/(?:jugend\s*|j)(\d{1,2})\b/i) + if (!ageMatch || ageMatch[1] !== team.age) return false return !team.teamNumber || String(teamNumber || '').trim() === team.teamNumber }