comparison parsedata.pl @ 169:04c4f1a95dbd

Fix parsing of some course codes.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 24 Aug 2015 10:59:20 +0300
parents 8b2107f0d50b
children 34ce8339b956
comparison
equal deleted inserted replaced
168:8b2107f0d50b 169:04c4f1a95dbd
252 if ($tid) 252 if ($tid)
253 { 253 {
254 $maxDays = $cday + 1 if ($cday + 1 > $maxDays); 254 $maxDays = $cday + 1 if ($cday + 1 > $maxDays);
255 255
256 # Grouped, if there is another class ID in second slot 256 # Grouped, if there is another class ID in second slot
257 $cgrouped = 1 if ($$cdata[1] =~ /^[A-Z]\d{5,6}[A-Z]*$/); 257 $cgrouped = 1 if ($$cdata[1] =~ /^([A-Z]\d{5,6}[A-Z]*|[A-Z0-9]{6,8})$/);
258 if ($cgrouped) 258 if ($cgrouped)
259 { 259 {
260 my $cdata1 = []; 260 my $cdata1 = [];
261 my $cdata2 = []; 261 my $cdata2 = [];
262 for (my $i = 0; $i < length($cdata); $i += 2) 262 for (my $i = 0; $i < length($cdata); $i += 2)