from re import split


def to_camel_case(text):
    """
    Complete the method/function so that it converts dash/underscore delimited words into camel casing.
    The first word within the output should be capitalized only if the original word was capitalized.

    Examples
    to_camel_case("the-stealth-warrior") # returns "theStealthWarrior"

    to_camel_case("The_Stealth_Warrior") # returns "TheStealthWarrior"
    """
    text = split(r"-|_", text)
    text = [text[0]] + [txt.title() for txt in text[1:]]
    return "".join(text)
