UNB+UNOA:3+QAMORRISONSHUB:ZZ+QAMORRISONSTP1:ZZ+220701:0742+1421++ORDERS’
UNH+142100001+ORDERS:D:96A:UN’
BGM+220+13521354+9’
DTM+4:20220701:102’
DTM+137:20220701:102’
DTM+64:20220708112000:204’
DTM+63:20220708112000:204’
DTM+200:20220701:102’
FTX+AAB+++30th Day of 2nd Month, Discount 0%’
FTX+COI+++ATTN?: ORDER DEPARTMENT. – DELIVERY CONFIRMED FOR 11.20 ON 8/07/22 --P:LEASE NOTE THAT THIS BOOKING IN TIME MUST BE STRICTLY ADHERED TO. VEHI:CLES ARRIVING EITHER EARLY OR LATE WILL BE ASKED TO WAIT FOR THE NEXT:AVAILABLE SLOT. ADDITIONAL INFORMATION?: In case of order query please:telephone?: Fresh 0845 611 5000 / Ambient 0845 611 5601 In case of deli’
FTX+COI+++very query please telephone 01795 518638’
NAD+BY+5010251000006::9+WM. MORRISON SUPERMARKETS PLC:HILMORE HOUSE:GAIN LANE:BRADFORD:BD3 7DL’
NAD+SU+08000859801808::9+Macphie Of Glenbervie (IWF):GLENBERVIE:NULL:STONEHAVEN:AB39 3YG+STONEHAVEN’
RFF+IA:9793’
NAD+DP+5010251007814::9+FLEETEND WAY:G PARK:KEMSLEY:SITTINGBOURNEKEN:GBME10 2FD’
CUX+5:GBP’ALC+A++++FA:::00000000000000000000’
LIN+1++05017506411617:EN’
PIA+1+109942659:IN’
IMD+++:::PIN?: [1 X] (B) MACPHIE NON HYDROGEN:ATED SWEET SNOW 12.5KG’
QTY+21:84’
PRI+AAA:13.65’
UNS+S’
CNT+2:1’
UNT+24+142100001’
UNZ+1+1421’
For the above text i using below regex expression
(?<=+)[A-Z0-9]+(?=:ZZ)
the regex is throwing correct value only
but ZZ will always not be there it can be any other value
can someone suggest general regex for the matches
match1 - QAMORRISONSHUB
match2 - QAMORRISONSTP1
Please try this…this will match both values together…after getting the data split the retrieved data using plus (+) sign and then get both values separately
No @ajindal. There is no error in screenshot it shows the pattern error, that means Look a head doesn’t allow in some application. This will not effect yours you can use the regular expression.