I have the following string:
01/12/2015-04/27/2015 Lecture Monday, Wednesday, Friday 12:00PM - 12:50PM, CoolGuy Hall, Room 006 01/12/2015-04/27/2015 Laboratory Thursday 10:50AM - 12:05PM, Epic Science, Room 121
I am trying to parse it so I can get objects like so
{
days: ["Monday", "Wednesday", "Friday"]
start: "12:00PM"
end: "12:50PM"
location: "CoolGuy Hall, Room 006"
}
and
{
days: ["Thursday"]
start: "10:50AM"
end: "12:05PM"
location: "Epic Science, Room 121"
}
Is there anyway to do this cleanly? I have tried using the split method using the dates:
/((..\/..\/....)-(..\/..\/....) \w+)/
to no avail and as you can see above my regex skills are fairly limited.
Thank you!