Regex match even number of letters,re.compile('^([^A]*)AA([^A]|AA)*$')