diff --git a/internal/config/config.go b/internal/config/config.go index 1d8d6df..cdff0fa 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -49,29 +49,29 @@ const ( // arrPatternString represents the regular expression pattern used to match arrival patterns. // The pattern matches strings in the format: "(TYPE-NUMBER-SSR-DEPARTURE-ARRIVAL)". // The pattern captures the following named groups: - // - type: the three-letter type code + // - category: the three-letter category code // - number: the alphanumeric flight number // - ssr: the alphanumeric SSR code // - departure: the four-letter departure airport code // - arrival: the four-letter arrival airport code - arrPatternString = `^\((?P[A-Z]{3})-(?P[A-Z0-9]+)-(?P[A-Z0-9]+)-(?P[A-Z]{4})-(?P[A-Z]{4})\)$` + arrPatternString = `^\((?P[A-Z]{3})-(?P[A-Z0-9]+)-(?P[A-Z0-9]+)-(?P[A-Z]{4})-(?P[A-Z]{4})\)$` // depPatternString represents the regular expression pattern used to match departure patterns. // The pattern matches strings in the format: "(TYPE-NUMBER-SSR-DEPARTURE-DEPARTURE_TIME-ARRIVAL)". // The pattern captures the following named groups: - // - type: the three-letter type code + // - category: the three-letter category code // - number: the alphanumeric flight number // - ssr: the alphanumeric SSR code // - departure: the four-letter departure airport code // - departure_time: the four-digit departure time // - arrival: the four-letter arrival airport code - depPatternString = `^\((?P[A-Z]{3})-(?P[A-Z0-9]+)-(?P[A-Z0-9]+)-(?P[A-Z]{4})-(?P\d{4})-(?P[A-Z]{4})\)$` + depPatternString = `^\((?P[A-Z]{3})-(?P[A-Z0-9]+)-(?P[A-Z0-9]+)-(?P[A-Z]{4})-(?P\d{4})-(?P[A-Z]{4})\)$` // fplPatternString is a regular expression designed to parse and extract detailed information from formatted flight plan strings. // The flight plan string is expected to follow a specific format, encapsulated by parentheses and containing various segments separated by hyphens. // Each segment captures a different aspect of the flight plan, as detailed below: // - // - type: Matches a three-letter flight type code. + // - category: Matches a three-letter flight category code. // - number: Matches the flight number, consisting of letters followed by digits. // - indicator: Matches a two-letter indicator. // - aircraft: Matches the aircraft registration or type, which may include a slash and an optional letter. @@ -94,7 +94,7 @@ const ( // - remark: Matches remarks, capturing any characters in this segment. // // The regular expression uses named capture groups for each segment, allowing for easy extraction of specific information from a matched flight plan string. - fplPatternString = `\((?P[A-Z]{3})\-(?P[A-Z]+\d+)\-(?P[A-Z]{2})(.*\n)?(.*\n)?\-(?P[A-Z]+\d+\/?[A-Z]?)\s*\-(?P.*)(.*\n)?\-(?P[A-Z]{4})(?P\d{4})(.*\n)?\-(?P[A-Z]+\d+)(?P[A-Z0-9]+)\s(?P.*)(.*\n)?\-(?P[A-Z]{4})(?P\d{4})\s(?P[A-Z]{4})(.*\n)?\-(?PPBN\/[A-Z0-9]+)\s(?P