DevJourney · code I wrote while learning

re.match().py

97 B
import re

s = input("Enter statement: ")
reg = r"\w+"
res = re.match(reg, s)
print(res.group())