# *-* coding: utf-8 *-* """ A collections of regular expression defining rules validating fields content. @author: R. Le Gac """ # Valid Collaboration field: # - CMS Collaboration # - CMS and LHCb Collaborations # - ATLAS Collaboration, CMS Collaboration # - Heavy Flavour Averaging Group # - CTA Consortium # - any mixture of the above separated by a comma # REG_COLLABORATION = \ r'^[A-Za-z0-9\-/, ]+([Cc]ollaboration|[Cc]onsortium|[Gg]roup)[s]?$' # Valid Conference dates # - 3 Dec 2012 # - 10-14 Dec 2012 # - 28 Jun - 4 Jul 2012 # reg1 = r'\d{1,2} [A-Z][a-z]{2} \d{4}' reg2 = r'\d{1,2}-\d{1,2} [A-Z][a-z]{2} \d{4}' reg3 = r'\d{1,2} [A-Z][a-z]{2} - \d{1,2} [A-Z][a-z]{2} \d{4}' REG_CONF_DATES = r'%s|%s|%s' % (reg1, reg2, reg3) # Valid Defence date # - 30 Dec 2012 # REG_DEFENSE = r'\d{2} [A-Z][a-z]{2} \d{4}' # Valid Submitted field # - 2012-12 # - 2012-12-31 # REG_SUBMITTED = r'\d{4}-\d{2}(-\d{2})?'