Regular Expressions 101

Library entries

ticket regexp

Vote

1

Regular Expression
pcre

/
(?x) ^\s*(\d+)\s+ # coupon number ([OX]) # stopover flag (\w{3})\s+ # depapt (\w{2})\s* # cr (\d{1,4}) # flnr ([A-Z0-9]{2}|\s+)\s+ # operating carrier ([A-Z])\s+ # booking class (\d{2}\w{3}\d{4})\s+ # dep datetime (\w{2})\s+ # status ([\w\d\/]+)\s+ # farebase (\w)\s+ # coupon status (\d{2}\w{3}|\s) # nvb (\d{2}\w{3}|\s)\s+ # nva ([A-Z\d]{2,3}) # baggage allowance
/
mg

Description

Loading markdown...
Submitted by anonymous - 7 years ago