import re


def format_ipc_dimension(number: float, decimal_places: int = 2) -> str:
    """
    Format a dimension (e.g. lead span or height) according to IPC rules.
    """
    formatted = '{:.2f}'.format(number)
    stripped = re.sub(r'^0\.', '', formatted)
    return stripped.replace('.', '')