import re


def split_composite_term(x, joint_re = 'with'):
    """Break terms that are composites padding several words without space. This has been observed in one case study but may not be prevalent.

    Args:
        x (str): the term to split if matching, e.g. 'claywithsand' to 'clay with sand'
        joint_re (str): regular expression for the word used as fusing join, typically 'with'

    Returns:
        split wording (str): tokens split from the joining term.

    """
    return re.sub("([a-z]+)(" + joint_re + ")([a-z]+)", r"\1 \2 \3", x, flags=re.DOTALL)