I have a program where I am taking in input from a user.
I want to be able to detect when the user says something like:
"Set HP 25 to 9999"
and then extract both the 25 and 9999 using regex.
Is it:
if re.match(r"^Set HP ([\d]+) to ([\d]+)$", userstring)
and if so, how do I extract the two numbers the user entered also using regex?