diff options
author | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2024-07-02 10:07:49 +0100 |
---|---|---|
committer | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2024-07-02 10:07:49 +0100 |
commit | cc5272cd4be2ab55fa8411790082be408b586be9 (patch) | |
tree | 8436c54cdeb94e6383607fe0028b09a19790e8d2 /ADSBDecoder/ADSBRegEx.swift | |
parent | 58d9d561df35f88884b2959d2cf322f1ee69e3cd (diff) | |
download | ADSBDecoder-cc5272cd4be2ab55fa8411790082be408b586be9.tar.gz ADSBDecoder-cc5272cd4be2ab55fa8411790082be408b586be9.zip |
Make ADSBDecoder more modular. Integrate into LearnMapKit
Diffstat (limited to 'ADSBDecoder/ADSBRegEx.swift')
-rw-r--r-- | ADSBDecoder/ADSBRegEx.swift | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ADSBDecoder/ADSBRegEx.swift b/ADSBDecoder/ADSBRegEx.swift new file mode 100644 index 0000000..e9ebe17 --- /dev/null +++ b/ADSBDecoder/ADSBRegEx.swift @@ -0,0 +1,35 @@ +// +// ADSBRegEx.swift +// ADSBDecoder +// +// Created by Jacky Jack on 30/06/2024. +// + +import Foundation +import RegexBuilder + +let matchADSBLong = Regex { + Anchor.startOfLine + "*" + + Repeat( + CharacterClass( + ("a"..."f"), + ("0"..."9") + ) + ,count:28) + + ";" +} + +let matchADSBShort = Regex { + Anchor.startOfLine + "*" + Repeat( + CharacterClass( + ("a"..."f"), + ("0"..."9") + ) + ,count:14) + ";" +} |