import re


def book_title_to_url(title: str) -> str:
    """
    Transform a book title into its URL-friendly equivalent.

    Args:
        title (str): Any one-line string already secured.

    Returns:
        String containing only the following characters ``a-zA-Z0-9_-``
    """
    return re.sub(r"[^a-zA-Z0-9_-]", "", re.sub(r" ", "_", title)).lower()