0

I have a string of text that has multiple linebreaks. I want to get some of the text inbetween it. How would I do this?

\w+\*\w+\*1000018220\*\n.+\n.+\n\w+\*\w+\*(\d+\.\d+)

I tried this, but this just goes line by line and i'm unsure of how to get between two tags that have linebreaks.

This is how the string looks
TEXT*TEXT*1000018220*
TEXT*TEXT*TEXT1419*
TEXT*TEXT*KH005*
QTY*QD*123.45*KH
MEA**MU*12345.6*KH***22
TEXT*150****TEXT*201900000000
TEXT*151****TEXT*201900000000
QTY*QD*123.45*KH
QTY*QD*123.45*KH
QTY*QD*0.00*KH
QTY*QD*123.45*KH
QTY*QD*0.00*KH
TEXT*TEXT*1000018220*

I want to get the values of the lines with the QTYQD###.##KH from between the 1000018220 headers. The result would return this

123.45
123.45
123.45
0.00
123.45
0.00

0 Answers0