import re


def _strip(content):
    """Strips and replaces all spaces before beginning of the text.
    """
    return '\n'.join(
        [re.sub(r'^\s+', '', line) for line in content.split('\n')]).strip()