I have the following code:
testREString = '(hello | goodbye) \s darkness \s my \s old \s friend'
testString = 'sound of silence: goodbye darkness my old friend'
exp = re.compile(testREString, re.VERBOSE)
print(exp.findall(testString))
and it returns: ['goodbye']
where I had expected it to return the full sentence - in fact, using exp.search(testString)
it had picked out the rest of the sentence correctly. Why then, was the complete match not displayed?
Thank you for your time.