I am currently trying to use re.match function from python. I then have an if statment where if re.match returns anything(indicating that the regex is contained in the string) then it will return what the original string was.Otherwise if it fails I would want to return the word 'failed'.
How would I be able to do this?
Short form: How can an if statement accept any value that isn't a non return.