import re


def strip_subscript(string):
    """Given a string, strip everything from the first "_" onward (inclusive)."""
    if len(re.findall(r'_', string)) > 0:  # has a subscript?
        string = re.sub(r'_.*$', r'', string)
    return string