def clean_from_refs(text):
    """Return text without references like [1] in the end of the text"""

    text = text.replace('\r\n', ' ')

    if '[' in text:
        position = text.find('[')
        if position > 0:
            text = text[:position]
    return text