|
33 | 33 | INFO 201 A /AUT25 Large Lecture |
34 | 34 | MUSEN 350/550/AUT25 Large Lecture # No section! |
35 | 35 | STAT/SOC/CS&SS 221 /AUT25 Large Lecture # No section! |
| 36 | +STAT/SOC /CS&SS 221 / WIN26 Large Lect # extra space in currics |
36 | 37 | """ |
37 | | - |
38 | 38 | event_pat = re.compile( |
39 | 39 | r""" |
40 | | - ^ # start at beginning |
41 | | - (?:\*?) # optional asterisk (why?) |
42 | | - (?P<exam>EXAM:\*?\ )? # it's an exam, and another asterisk? |
43 | | - (?P<curric>[A-Z &]+) # curric abbrev, can contain space, & |
44 | | - (?:\/[A-Z &]+)* # additional currics, separated by slashes |
45 | | - [ ] # space separator |
46 | | - (?P<number>\d{3}) # course number, 3 digits |
47 | | - (?:\/\d{3})* # additional numbers, separated by slashes |
48 | | - [ ]* # optional space separator |
49 | | - (?P<section>\w{0,2}) # section, 1 or 2 letters |
50 | | - # rest is ignored |
| 40 | + ^ # start at beginning |
| 41 | + (?:\*?) # optional asterisk |
| 42 | + (?P<exam>EXAM:\*?\ )? # it's an exam, and another asterisk? |
| 43 | + (?P<curric>[A-Z &]+?) # curric abbrev, can contain space, & |
| 44 | + (?:\ ?\/ # slash separator, maybe an extra space |
| 45 | + (?P<curric2>[A-Z &]+?))? # second curric |
| 46 | + (?:\ ?\/ # slash separator, maybe an extra space |
| 47 | + (?P<curric3>[A-Z &]+?))? # third curric |
| 48 | + [ ] # space separator |
| 49 | + (?P<number>\d{3}) # course number, 3 digits |
| 50 | + (?:\/ # slash separator |
| 51 | + (?P<number2>\d{3}))? # second number |
| 52 | + [ ]* # optional space separator |
| 53 | + (?P<section>\w{0,2}) # section, 1 or 2 letters, or absent |
| 54 | + # rest is ignored |
51 | 55 | """, re.VERBOSE) |
52 | 56 |
|
| 57 | +""" |
53 | 58 | # some room names to match |
54 | | -# 'BAG 260' |
55 | | -# 'HST T568' |
56 | | -# 'SWS 026-030' |
57 | | -room_pat = re.compile(r""" |
58 | | - ^ # start at beginning |
59 | | - (?P<building>[A-Z]+[0-9]?)\s+ # building code |
60 | | - (?P<room>[A-Z]?\d{2,3}[A-Z]?) # room number |
61 | | - (?:-.*)? # room "extension" |
62 | | - $ # end at end |
63 | | -""", re.VERBOSE) |
| 59 | +BAG 260 |
| 60 | +HST T568 |
| 61 | +SWS 026-030 |
| 62 | +CSE2 G20 |
| 63 | +GNOMS060 |
| 64 | +""" |
| 65 | +room_pat = re.compile( |
| 66 | + r""" |
| 67 | + ^ # start at beginning |
| 68 | + (?P<building>[A-Z0-9]{,4}?) # building code, 4 chars or less |
| 69 | + [ ]* # optional space separator |
| 70 | + (?P<room>[A-Z]?\d{2,3}[A-Z]?) # room number, 2 or 3 digits |
| 71 | + (?:-.*)? # combined room number, ignore it |
| 72 | + $ # end at end |
| 73 | + """, re.VERBOSE) |
64 | 74 |
|
65 | 75 |
|
66 | 76 | class Command(BaseCommand): |
|
0 commit comments