import re

IDCARD_REGEX = '[1-9][0-9]{14}([0-9]{2}[0-9X])?'

def is_valid_idcard(idcard):

"""Validate id card is valid."......