code: def nextColRegex(sheet, colregex):
      'Go to first visible column after the cursor matching `colregex`.'
      pivot = sheet.cursorVisibleColIndex
      for i in itertools.chain(range(pivot+1, len(sheet.visibleCols)), range(0, pivot+1)):
          c = sheet.visibleCols[i]
          if re.search(colregex, c.name, regex_flags()):
              return i
  
      fail('no column name matches /%s/' % colregexf nextColRegex(sheet, colregex):
      'Go to first visible column after the cursor matching `colregex`.'
      pivot = sheet.cursorVisibleColIndex
      for i in itertools.chain(range(pivot+1, len(sheet.visibleCols)), range(0, pivot+1)):
          c = sheet.visibleCols[i]
          if re.search(colregex, c.name, regex_flags()):
              return i
  
      fail('no column name matches /%s/' % colregex)
docs: Go to first visible column after the cursor matching `colregex`.