In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to achieve the regular expression of SITA message decoding matching, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Regular expression for decoding and matching of SITA messages
1. SITA message
ZCZC GRD0226 260108
QU TYNZPCA
.
TYNTZ8X TYNZPCA
.XMNUOMF 260107
PLN 27MAR
1) MF8155 B6483 ILS (8) JJN2340 (26MAR) 0120NKG
2) MF8155 B6483 ILS (8) NKG0220 0425TYN
3) MF8156 B6483 ILS (8) TYN0525 0735NKG
4) MF8156 B6483 ILS (8) NKG0900 1050JJN
SI: A/C CHG
=
NNNN
2. Query the log of fdoagent:
[n] [FDOAGENT::HST] [03-26 01:07:49] > Receive NetObj FDPTEL_AFTNMESSAGE FinID = 202003260010226GRD
/ / received a message with the title GRD/ pipelining 0226
[n] [FDOAGENT::HST] [03-26 01:07:49] > [OnSITA2UpdatePlan]:: header.typestr=PLN!
/ / identified as PLN report in SITA format
[n] [FDOAGENT::HST] [03-26 01:07:49] > > RegularExpesstionID = 139, Modify regnum = B6483: acid = CXA8155, executedate = 20200327, etd = 1020, depad = ZSNJ, arrad = ZBYN
/ / use regular expressions to capture and extract the contents needed in groups [N] [FDOAGENT::HST] [03-26 01:07:49] > > PLN SQL:select * from PLAN_ACTIVE where ETD > = '202003270420' and ETD > > PLN SQL:update PLAN_ACTIVE set REGNUM = 'B6483', STD='202003271020', MODIFIER = 'FAG' where ID =' 202003271020CXA8155ZSNJZBYN' and VALID = 1
/ / the database query gets the planned database ID:202003271020CXA8155ZSNJZBYN,update table PLAN_ACTIVE plan.
[n] [FDOAGENT::HST] [03-26 01:07:49] > SndFDOudp:$#NOTICE$#FAG$#PLAN_ACTIVE$#U$#202003271020CXA8155ZSNJZBYN$#
/ / UDP notifies FDO that the plan CXA8155 has changed
[n] [FDOAGENT::HST] [03-26 01:07:50] > SQL:insert into TEL_RCV (ID, TELCSN, TELTYPE, SUBTYPE, GRADE,SNDADDR, RCVADDR, ERROR, TEXT, INDATE, ERRORREASON, ACTIVEID, ACID, ADEP, ADES, MESSAGE, SITAINFO) values (.)
/ / write the received message to the database TEL_RCV
[n] [FDOAGENT::HST] [03-26 01:07:50] > SndFDOudp:$#NOTICE$#FAG$#TEL_RCV$#I$#202003260010226GRD$#
/ / UDP notifies FDO that the plan message has changed
Third, locate the following contents in regularexp.xml:
\ b (\ w {2}\ d {2myr4} [Amurz]?) [] + (\ w {2mer6}) [] + ILS\ (. +?\) [] + ([Amurz] {3}) (\ d {4}) (\ ((\ d {2} [Amurz] {3}))? [] +\ d {4} ([Amurz] {3})\ s* [\ r]?\ n regular expression (required)
139 numbering of regular expressions
MODIFY operation type: CNL: cancel the flight, MODIFY: change the flight number (required)
Whether false is a continuous flight: true, false (required)
Only fill in in the case of continuous flight, only 2 or 4 (required when continuous flight is true)
Whether the false regular expression matches multiple lines: true,false (required)
1 [1]: the parenthesis (integer) corresponding to the flight number of MF8155
2 [2]: the parenthesis corresponding to the B6483 machine number (integer)
The second flight number (this is the kind of special treatment in which there is some explanatory information between the two flight numbers, such as CZ6002 SVO-URC CZ6907, which is not in the general format and is usually not filled in)
3 [3]: JJN
The parenthesis corresponding to the departure airport of the first flight (integer)
4 [4]: 2340 the parenthesis (integer) corresponding to the estimated departure time of the first flight
7 [7]: the parenthesis corresponding to the landing airport of the first flight of NKG (integer)
6 [6]: the parenthesis (integer) corresponding to the 26MAR date (required if the expression has a date)
4. YART tool RegexTester.exe
A tool to write and test regular expressions, generate VB/C# code, and compile assemblies. RegexOptions.Singleline feature added by deerchao.
Set up: Results---- > Report;Command-- > Split and then execute Run
Result report:
[0]: ZCZC GRD0226 260108
QU TYNZPCA
.
TYNTZ8X TYNZPCA
.XMNUOMF 260107
PLN 27MAR
1)
[1]: MF8155
[2]: B6483
[3]: JJN
[4]: 2340
[5]: (26MAR)
[6]: 26MAR
[7]: NKG
[8]: 2)
[9]: MF8155
[10]: B6483
[11]: NKG
[12]: 0220
[13]: TYN
[14]: 3)
[15]: MF8156
[16]: B6483
[17]: TYN
[18]: 0525
[19]: NKG
[20]: 4)
[21]: MF8156
[22]: B6483
[23]: NKG
[24]: 0900
[25]: JJN
[26]: SI: A/C CHG
=
NNNN
Fifth, the packet capture content displayed by RegexBuddy (select language C #) (re-numbering each planned packet starting with 1)
Regular expression:
\ n0x0A (10) in LF or ASCII
\ r 0x0D in CR or ASCII (13)
\ b: matches the empty character at the boundary of the word
The above is all the contents of the article "how to realize the regular expression of SITA message Decoding matching". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.