The problem is that regexObj.match() only matches at the start of the string. What you want to use is regexObj.search(), which will find the pattern anywhere in the string.

Also, if you use the matchObj.groups() method then you need to define at least one group in you pattern, e.g. '(a)', otherwise it will always return an empty tuple. If you just want to return the matched string then use matchObj.group().