Hello.
So i have an issue with this and i really don't see how i can get around it.
I use a regex to get data from a PDF file. It's a order confirmation from my supplier and as such i need to check if the OC is consistent with the data in my system. I figured i'd get rid of the manual work and automatize the process. When i use the regex, the data will be inserted in an array in the same order as in the OC. My problem is that there are three variables in that OC that are not static- Sometimes that value will appear twice, and i need them both, sometimes once, and sometimes not at all-. Now AFTER this variable there are two variables that ARE static and i need them extraced in the same go to ensure they originate from the same string. Let me show you:
This is a part of the regex extraction. As you can see, sometimes the RALXXXX value (the color actually) is present twice and sometimes omitted.Please Login or Register to view this content.
I need to get this sorted. Either by replacing the missing RAL values with something, OR reordering the array to get the second last variable (my order number) AND the last variable (my row number) first.
Now i'm very bad at arrays so i really need some help. Perhaps there is a completely other way to solve this that i have not thought of?
This is what i got today:
Please Login or Register to view this content.
Bookmarks