Last active
May 1, 2016 09:38
-
-
Save jasiek/4d0446b22bc095fa555b75b0a0e91183 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://en.wikipedia.org/wiki/Call_signs_in_the_United_Kingdom#Call_sign_assignments_for_amateur_radio | |
# This appears to work: | |
/ | |
(?<reg>[UDJIMWPTHNSC]?) | |
(?<callsign>M\g<reg>[01356][A-Z]{3})| | |
(?<callsign>(G\g<reg>[123468][A-Z]{2,3})| | |
(G\g<reg>[07][A-Z]{3})|(G\g<reg>5[A-Z]{2}))| | |
(?<callsign>2[EUDJIMW][01][A-Z]{3}) | |
/ | |
# This doesn't: | |
/ | |
(?<reg>[UDJIMWPTHNSC]?)(?<m_callsign>M\g<reg>[01356][A-Z]{3})| | |
(?<g_callsign>(G\g<reg>[123468][A-Z]{2,3}) | |
(G\g<reg>[07][A-Z]{3})|(G\g<reg>5[A-Z]{2})) | |
(?<two_callsign>2[EUDJIMW][01][A-Z]{3}) | |
(\k<m_callsign>|\k<g_callsign>|\k<two_callsign>) | |
/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment