import re


def _is_abbreviation_for(abbreviated, full):
    """
    >>> _is_abbreviation_for('yr', 'years')
    True
    >>> _is_abbreviation_for('years', 'years')
    True
    >>> _is_abbreviation_for('szco', 'years')
    False

    Thanks to Michael Brennan
    http://stackoverflow.com/questions/7331462/check-if-a-string-is-a-possible-abbrevation-for-a-name/7332054#7332054
    """
    abbreviated = abbreviated.strip()
    if abbreviated:
        pattern = ".*".join(abbreviated)
        return bool(re.match("^" + pattern, full, re.IGNORECASE))