human
string extract title titanic.
assistant
Here is a Python function for string extract title titanic

import re

def titanic_title(string):
    """
    Extract titanic title from string.
    """
    return string.split(" ")[0]

# Enter the string
string = "titanic"

# Calling the function
print((titanic_title(string)))

#Example Output
# titanic

#Remember to inspect code for bugs.