This imports the `re` module every time this function is called.