mercredi 25 juillet 2018

Slightly complicated web text to variable parsing

I'm taking text from a website and parsing it into variables. However, the string I get when I pull the text is a bit complicated. It looks like this on the web...

Invoice #: 1267
Date: 4/16/2018 10:44:00 AM
PO #:
Reference:
Countermen: A/A

The issue i'm having is that all of this is one string. The string also changes dynamically as some orders have text inputted where others don't. Such as some orders that has every field filled while other orders have almost no field filled.

Invoice #:
1267

<br>

Date:
4/16/2018 10:44:00 AM

<br>

PO #:

<br>

Reference:

<br>

Countermen:
A/A

This is what is displayed when I inspect the web element.

I want to parse out the information into individual strings and ints for a test and i'm having difficulties dealing with the whole 'dynamic' part of the string as some strings will be longer while some will be shorter.

Heres some images of the actual website if it helps:

Web html code

What the website displays




Aucun commentaire:

Enregistrer un commentaire