Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Regex solution in Clear category for First Word by kkkkk
import re
def first_word(text: str) -> str:
"""Return the first word in a given text; word can have an apostrophe."""
matches = re.search(r"([\w']+)", text)
return matches.groups()[0] if matches.groups() else None
Oct. 3, 2019