Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?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

no description available

Submitted by anonymous - 10 years ago