import re


def num_indented(line: str) -> int:
    """Number of spaces the string is indented if indented with only spaces."""
    m = re.match(pattern=r"^(\s*)\S", string=line)
    indentation = 0
    if m:
        indentation = len(m.group(1))
    return indentation