Get regex matches from Array of string

Hi,

I’ve succesfully extracted values to their own variables from PDF i need using Regex. I have four different values. Lets say A,B,C,D. Values are in string format.

Now my problem is that i need to know how many B- values are under A until we come to Value C.
I’ve transformed my PDF to chararray and trying to build logic from there. Is this correct path to go or maybe we have something handier available. :slight_smile:

-Mikko-

Hi @Mikko_S

create a intvar1=Stroutput.split(“”,Environment.NewLine.ToCharArray)(0).Length

likewise do it for other values

Thanks
Ashwin S

1 Like

Thank you. This is the logic i was heading too. :slight_smile:

Still puzzling.
I’ve multiple order lines in my PDF in a format described at the end of message. I’ve regexed SIGMPR number (74700 and 70400). Trouble is that under Sig we might have multiple orders (kund material numbers(also regexed). So initially i was thinking of logic that as long as Sig stays the same, we can input Kundmaterial number. Would be so handy if i could do "while SIG(0) input kundmaterial. IF SIG(1), update SIG to system > continue inputting Kundmaterial numbers…

Order: 4283626
BIR: 75221702/SIGMPR: 74700
Kund-material nr.: 6556478912

Order: 4286844
BIR: 75221580/SIGMPR: 70400
Kund-material nr.: 1234567890

Kund-material nr.: 7711769399

Maybe my problem description was not accurate enough. Result that i need is actually billing values from PDF. I’ve regexed all those but then i gotta know which value belongs to which order line in the bill. I figured order lines in my invoice follow same pattern so i just PDFtext.Split({“Order:”},StringSplitOptions.None) and then regex array in a for- loop…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.