Just keep scanning
Check for m.lastindex is None before doing integer comparison