Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 3x 3x 36x 3x 38x | const courseNumRegex = /^(\d{1,3})([a-zA-Z]{0,2})$/;
const getCourseNumber = (rawCourseNumber) => {
return rawCourseNumber.match(courseNumRegex)
? rawCourseNumber.match(courseNumRegex)[1]
: "";
};
const getSuffix = (rawCourseNumber) => {
return rawCourseNumber.match(courseNumRegex)
? rawCourseNumber.match(courseNumRegex)[2].toUpperCase()
: "";
};
export { getSuffix, getCourseNumber, courseNumRegex };
|