Template talk:2018–19 Bundesliga matches
Latest comment: 5 years ago by S.A. Julio in topic Regular expression to check team results are correct
Regular expression to check team results are correct
editTo check the colouring of results is correct for matches between German teams, find the following:
(\| match_([^\d]{3})_.* \| match_([^\d]{3})_.* = {{Football box collapsible\n\|round.*\n\|date.*\n\|time.*\n\|team1.*\n\|score *= (\d)–(\d)\n(\|aet.*\n)?(\|aggregatescore.*\n)?\|report.*\n\|team2.*\n\|goals1.*((\n\*.*)?)*\n\|goals2.*((\n\*.*)?)*\n\|stadium.*\n\|location.*\n\|attendance.*\n\|referee.*\n(\|penalties1.*((\n\*.*)?)*\n\|penaltyscore.*\n\|penalties2.*((\n\*.*)?)*?\n)?\|result *= ).*
and replace with:
$1{{subst:#ifexpr:$4=$5|D|{{subst:(}}{{subst:(}}#ifeq:{{subst:(}}{{subst:(}}{{subst:(}}{{subst:#ifexpr:$4>$5|$2|$3}}{{subst:)}}{{subst:)}}{{subst:)}}{{subst:!}}y{{subst:!}}W{{subst:!}}L{{subst:)}}{{subst:)}}}}
on a site such as this. S.A. Julio (talk) 08:12, 4 March 2019 (UTC)