skytracker.utils.validation.Regex#

class skytracker.utils.validation.Regex#

Bases: object

Common regular expressions

Properties

aircraft_callsign

regular expression for aircraft callsign

aircraft_callsign_wildcard

regular expression for aircraft callsign supporting wildcards

aircraft_icao24

regular expression for aircraft ICAO 24-bit address (hex)

aircraft_icao24_wildcard

regular expression for aircraft ICAO 24-bit address (hex) supporting wildcards

aircraft_model

regular expression for aircraft model code

aircraft_model_wildcard

regular expression for aircraft model code supporting wildcards

aircraft_registration

regular expression for aircraft registration

aircraft_registration_wildcard

regular expresion for aircraft registration supporting wildcards

alphanumeric

regular expression for alphanumeric text

alphanumeric_spaces

regular expression for alphanumeric text with spaces

alphanumeric_spaces_wildcard

regular expression for alphanumeric text with spaces supporting wildcards

alphanumeric_wildcard

regular expression for alphanumeric text supporting wildcards

code_2

regular expression for 2-character alphanumeric code

code_2_wildcard

regular expression for 2-character alphanumeric code supporting wildcards

code_3

regular expression for 3-character alphanumeric code

code_3_wildcard

regular expression for 3-character alphanumeric code supporting wildcards

code_4

regular expression for 4-character alphanumeric code

code_4_wildcard

regular expression for 4-character alphanumeric code supporting wildcards

phone_number

regular expression for (international) phone numbers

transponder_squawk

regular expression for transponder squawk code

transponder_squawk_wildcard

regular expression for transponder squawk code supporting wildcards

Methods

__init__()#
aircraft_callsign: str = '^[A-Z0-9]{1,10}$'#

regular expression for aircraft callsign

Type:

str

aircraft_callsign_wildcard: str = '^[A-Z0-9\\_\\.]{1,10}$'#

regular expression for aircraft callsign supporting wildcards

Type:

str

aircraft_icao24: str = '^[0-9A-Fa-f]{6}$'#

regular expression for aircraft ICAO 24-bit address (hex)

Type:

str

aircraft_icao24_wildcard: str = '^[A-Z0-9\\_\\.]{1,6}$'#

regular expression for aircraft ICAO 24-bit address (hex) supporting wildcards

Type:

str

aircraft_model: str = '^[A-Z0-9]{3,4}$'#

regular expression for aircraft model code

Type:

str

aircraft_model_wildcard: str = '^[A-Z0-9\\_\\.]{1,4}$'#

regular expression for aircraft model code supporting wildcards

Type:

str

aircraft_registration: str = '^[A-Z0-9]{1,4}-?[A-Z0-9]{2,5}(-?[A-Z]{1,3})?$'#

regular expression for aircraft registration

Type:

str

aircraft_registration_wildcard: str = '^[A-Z0-9\\_\\-\\.]+$'#

regular expresion for aircraft registration supporting wildcards

Type:

str

alphanumeric: str = '^[a-zA-Z0-9]+$'#

regular expression for alphanumeric text

Type:

str

alphanumeric_spaces: str = '^[a-zA-Z0-9\\s]+$'#

regular expression for alphanumeric text with spaces

Type:

str

alphanumeric_spaces_wildcard: str = '^[a-zA-Z0-9\\s\\_\\.]+$'#

regular expression for alphanumeric text with spaces supporting wildcards

Type:

str

alphanumeric_wildcard: str = '^[a-zA-Z0-9\\_\\.]+$'#

regular expression for alphanumeric text supporting wildcards

Type:

str

code_2: str = '^[A-Z0-9]{2}$'#

regular expression for 2-character alphanumeric code

Type:

str

code_2_wildcard: str = '^[A-Z0-9\\_\\.]{1,2}$'#

regular expression for 2-character alphanumeric code supporting wildcards

Type:

str

code_3: str = '^[A-Z0-9]{3}$'#

regular expression for 3-character alphanumeric code

Type:

str

code_3_wildcard: str = '^[A-Z0-9\\_\\.]{1,3}$'#

regular expression for 3-character alphanumeric code supporting wildcards

Type:

str

code_4: str = '^[A-Z0-9]{4}$'#

regular expression for 4-character alphanumeric code

Type:

str

code_4_wildcard: str = '^[A-Z0-9\\_\\.]{1,4}$'#

regular expression for 4-character alphanumeric code supporting wildcards

Type:

str

phone_number: str = '^\\(?\\+?\\d{1,3}?\\)?[\\s-]?(?:\\(0\\))?(?:\\(?\\d+\\)?[\\s-]?|\\w+[\\s-]?)+$'#

regular expression for (international) phone numbers

Type:

str

transponder_squawk: str = '^[0-9]{1,4}$'#

regular expression for transponder squawk code

Type:

str

transponder_squawk_wildcard: str = '^[0-9\\_\\.]{1,4}$'#

regular expression for transponder squawk code supporting wildcards

Type:

str