import re


def course_integer_in(course_integers):
    """Constrain the numeric portion of course.course_number is in course_integers."""
    def _satisfies(course):
        # Extract all digits from course_number, there should only be 1
        integers = re.findall(r'\d+', course.course_number)
        return int(integers[0]) in course_integers
    return _satisfies