jpatokal / openflights

Website for storing flight information, rendering paths on a zoomable world map and calculating statistics, with plenty of free airline, airport and route data.
http://openflights.org
GNU Affero General Public License v3.0
1.41k stars 395 forks source link

[Bug] Issue with flight number if carrier code ends in a number [sf#5] #5

Closed jpatokal closed 9 years ago

jpatokal commented 9 years ago

*Reported by anonymous on 2008-09-12 13:48 UTC** I just tried to add a JetBlue (B6) flight in. When I add a CO flight and put CO111 in the flight number the system automatically figures out the carrier and puts that in the box below. With B6 it did not, likely because it was a letter/number and not two letters. It looks like the effect is the same if the carrier is a number then a letter (e.g. Jet Airways/9W).

jpatokal commented 9 years ago

Commented by jpatokal on 2008-09-12 14:18 UTC The regexp for parsing IATA codes was (incorrectly) not accepting digits. The new one now recognizes:

* any two letters or digits followed by a space or a digit --> Flight number with IATA code

jpatokal commented 9 years ago

Updated by jpatokal on 2008-09-12 14:18 UTC