User:Pkchan/National squad re-formatting

1978 FIFA World Cup (squads)
Regular expression used for re-formatting:

/^|-$/d s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=MD/pos=MF/g

1982 FIFA World Cup (squads)
Regular expression used for re-formatting the raw data:

/^$/d s/^\([0-9]\{1,2\}\). \(.*\) (\(.*\)).*$//g s/^\(.*\)pos=\(.*\) (GK)\(.*\)$/\1pos=GK\2\3/g s/^\(.*\)club=\([^,]*\)\, \(.*\)\(.*\)$/\1club=\2, \3\4/g s/^\(.*\)club=\(alpha:] -]\{1,\}\)\(.*\)$/\1club=[[\2\3/g s/ AUS/ Australia/g s/ BEL/ Belgium/g s/ ENG/ England/g s/ ESP/ Spain/g s/ FRA/ France/g s/ FRG/ West Germany/g s/ SUI/ Switzerland/g

Regular expression used for re-formatting the formatted:

/^|-$/d s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D/pos=DF/g s/pos=M/pos=MF/g s/pos=F/pos=FW/g s/pos=-/pos=/g

1986 FIFA World Cup (squads)
Regular expression used for re-formatting:

/^$/d /^|-$/d s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=G/pos=GK/g s/pos=D/pos=DF/g s/pos=M/pos=MF/g s/pos=F/pos=FW/g s/pos=-/pos=/g

1990 FIFA World Cup (squads)
sed commands used for re-formatting:

/^$/d /^===.*===$/d /^$/d /^\[\[Image.*\]\].*\[\[\(.*\)\]\]\(<\/th>\)*<\/tr>$/s//=== \1 ===/ /^.*Player.*<\/tr>$/s/// /^\(.*\)<\/td>\(.*\)<\/td>\(.*\)<\/td><\/tr>$//g /^\(.*\)<\/td>\(.*\)<\/td>\(.*\)<\/td><\/tr>$//g /^\(.*\)<\/td>\(.*\)<\/td><td.*>\(.*\)<\/td><\/tr>$//g /^<tr.*><th.*Forward.*$/,/^ <th colspan=3.*Coach.*$/s/^ <td.*>\(.*\)<\/td><td.*>\(.*\)<\/td><td.*>\(.*\)<\/td><\/tr>$//g /^<tr.*><th.*Goalkeep.*$/d /^<tr.*><th.*Defender.*$/d /^<tr.*><th.*Midfield.*$/d /^<tr.*><th.*Forward.*$/d /^<tr.*><th.*>\(.*\)\(<\/th>\)*<\/tr>$/s//\1/ /^{{nat fs player|no=\([0-9]\)|\(.*\)$/s//{{nat fs player|no=0\1|\2/ /^<\/table>$/s//{{nat fs end}}/

/^{{nat fs start.*$/{ h D } /^===.*===$/G

/^{{nat fs end.*$/{ h D } /^{{nat fs player|no=22/G

/^Coach.*$/{ h D } /^===.*===$/G /^{{nat fs player|no=0\(.*\)|\(.*\)$/s//{{nat fs player|no=\1|\2/ /^$/d

1998 FIFA World Cup (squads)
Regular expression used for re-formatting the 6-column lists:

/^|-\(space:\)*$/d s/^{|.*$//g s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g /^!.*|$/d /^ # $/d /^Name$/d /^Position$/d /^Age$/d /^Caps$/d /^Team$/d /^$/d

Regular expression used for re-formatting the 5-column lists:

/^|-\(space:\)*$/d s/^{|.*$//g s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g /^!.*|$/d /^ # $/d /^Name$/d /^Position$/d /^DOB$/d /^Team$/d /^$/d

2002 FIFA World Cup (squads)
Regular expression used for re-formatting:

/^|-\(space:\)*$/d s/^{|.*$//g s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g /^!.*|$/d /^ # $/d /^Name$/d /^Position$/d /^Age$/d /^Caps$/d /^Team$/d /^$/d

1984 European Football Championship (squads)
/^$/d /^|-$/d s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g

1988 European Football Championship (squads)
/^$/d /^|-$/d s/^{|.*$//g s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g /^!.*|$/d /^ # $/d /^Name$/d /^Position$/d /^Team$/d

1992 European Football Championship (squads)
/^$/d /^|-$/d s/^{|.*$//g s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g /^!.*|$/d /^ # $/d /^Name$/d /^Position$/d /^Team$/d

1996 European Football Championship (squads)
/^|-\(space:\)*$/d s/^{|.*$//g s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g /^!.*|$/d /^! # $/d /^! Name$/d /^! Position$/d /^! DOB$/d /^! Team$/d

/^|-\(space:\)*$/d s/^{|.*$//g s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g /^!.*|$/d /^! # $/d /^! Name$/d /^! Position$/d /^! DOB$/d /^! Team$/d

2000 European Football Championship (squads)
/^|-\(space:\)*$/d s/^{|.*$//g s/^|}//g s/^|\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)||\(.*\)$//g s/pos=D|/pos=DF|/g s/pos=M|/pos=MF|/g s/pos=F|/pos=FW|/g s/pos=-|/pos=|/g /^!.*|$/d /^ # $/d /^Name$/d /^Position$/d /^Birthdate$/d /^Caps$/d /^Team$/d