<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ask_for_board_id(self):
 """Factored out in case interface isn't keyboard"""

        board_id = raw_input("paste in board id or url: ").strip()
        m = re.search(r"(?:https?://)?(?:trello.com)?/?b?/?([a-zA-Z]{8})/(?:.*)", board_id)
        if m:
            board_id = m.group(1)
        return board_id