Jump to content

Template talk:2018–19 Bundesliga matches

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Regular expression to check team results are correct

[edit]

To 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)[reply]