<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _gitignore_entry_to_regex(entry):
 """ Take a path that you might find in a .gitignore file and turn it into a regex """

    ret = entry.strip()
    ret = ret.replace('.', '\.')
    ret = ret.replace('*', '.*')
    return ret