summaryrefslogtreecommitdiff
path: root/ADSBDecoder/ADSBRegEx.swift
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2026-09-24 11:02:35 +0100
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2026-09-24 11:02:35 +0100
commit505b23afc68ecbb63b8f0a7d44c0b0ad063d5cfd (patch)
treed38b29a0cf23041571eb08fd79f49fdad8deb85f /ADSBDecoder/ADSBRegEx.swift
parent056ee0c3355db995d7ea571e0635ebe8b09bf8ee (diff)
downloadADSBDecoder-505b23afc68ecbb63b8f0a7d44c0b0ad063d5cfd.tar.gz
ADSBDecoder-505b23afc68ecbb63b8f0a7d44c0b0ad063d5cfd.zip
rearrange source, move common parts to framework
Diffstat (limited to 'ADSBDecoder/ADSBRegEx.swift')
-rw-r--r--ADSBDecoder/ADSBRegEx.swift87
1 files changed, 0 insertions, 87 deletions
diff --git a/ADSBDecoder/ADSBRegEx.swift b/ADSBDecoder/ADSBRegEx.swift
deleted file mode 100644
index 2841467..0000000
--- a/ADSBDecoder/ADSBRegEx.swift
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// 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)
-
- ";"
-}*/
-class MatchADSBLong {
- let matchADSBLong = Regex {
- Anchor.startOfLine
- "*"
-
- Repeat(
- CharacterClass(
- ("a"..."f"),
- ("0"..."9")
- )
- ,count:28)
-
- ";"
- }
-
- func prefixMatch(_ line: String) -> Regex<Regex<Substring>.RegexOutput>.Match? {
- do {
- if let match = try matchADSBLong.prefixMatch(in: line) {
- return match
- }
- } catch {
- return nil
- }
- return nil
- }
-}
-
-/*
-let matchADSBShort = Regex {
- Anchor.startOfLine
- "*"
- Repeat(
- CharacterClass(
- ("a"..."f"),
- ("0"..."9")
- )
- ,count:14)
- ";"
-}*/
-
-class MatchADSBShort {
- let matchADSBShort = Regex {
- Anchor.startOfLine
- "*"
- Repeat(
- CharacterClass(
- ("a"..."f"),
- ("0"..."9")
- )
- ,count:14)
- ";"
- }
-
- func prefixMatch(_ line: String) -> Regex<Regex<Substring>.RegexOutput>.Match? {
- do {
- if let match = try matchADSBShort.prefixMatch(in: line) {
- return match
- }
- } catch {
- return nil
- }
- return nil
- }
-}