<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract_from_text(text):
 """ Extract HAL ids from a text. :param text: The text to extract HAL ids from. :returns: A list of matching HAL ids. ['hal-01258754', 'hal-01258754v2'] """

    return tools.remove_duplicates([i[0]
                                    for i in REGEX.findall(text) if i != ''])