diff options
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) + ";" +} |