import re


def vars_in_str(s):
    """
    Given a string like 'mass/(length*time)', return the list
    ['mass', 'length', 'time'].

    INPUT:

    - ``s`` -- a string

    OUTPUT:

    - a list of strings (unit names)

    EXAMPLES::

        sage: sage.symbolic.units.vars_in_str('mass/(length*time)')
        ['mass', 'length', 'time']
    """
    return re.findall('[a-z|_]+', s)