Skip to content

Commit

Permalink
allow numeric airline code
Browse files Browse the repository at this point in the history
  • Loading branch information
rpatel3001 committed Oct 30, 2024
1 parent 447b1ba commit 84e959e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MessageDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class MessageDecoder {
// C-Band puts a 10 char header in front of some message types
// First 4 chars are some kind of message number
// Last 6 chars are the flight number
let cband = message.text.match(/^(?<msgno>[A-Z]\d{2}[A-Z])(?<airline>[A-Z]{2})(?<number>[0-9]{4})/);
let cband = message.text.match(/^(?<msgno>[A-Z]\d{2}[A-Z])(?<airline>[A-Z0-9]{2})(?<number>[0-9]{4})/);
if (cband?.groups) {
message.text = message.text.substring(10);
}
Expand Down

0 comments on commit 84e959e

Please sign in to comment.