import re


def FlagStart(data):
     """Finds the first flag in a string of data and finds out information  
     
     Information: What flag is it, it's key, beginning and end
	  
     Args:
         data: String of data you want to find the information about
     
     Returns:
         [flag, key, match.start(), match.end()]: if the functions finds out the information
         None: if the function doesn't find out any information  
     """
     match = re.search("\[{2}((A:[a-zA-Z0-9]+)|(O:[a-zA-Z0-9]+)|(I:[a-zA-Z0-9]+))\]{2}", data)
     if match:
         flag = data[match.start() + 2 : match.start() + 3]
         key = data[match.start() + 4 : match.end() - 2]
         return [flag, key, match.start(), match.end()]
     else:
         return None