Transaction Data in HTML file
Afficher commentaires plus anciens
Hello, I have a whole bunch of html files in a directory, named transactionData1.html, transactionData2.html and so on. In these HTML files, transaction information is buried with the following parameters of interest :
<b>Customer Name: </b>Michael Henesi<br />
... (some other stuff)
<b>Transaction ID:</b> 21987335670
The transaction ID has varying length and is sometimes not available (no entry in that field). Sometimes there are multiple transactions. Sometimes, the transaction ID is specified as:
<b>Transaction ID: </b>21987335670
that is, the space before transaction ID gets shifted to space after the colon.
In some HTML files, both, the Customer Name and the Transaction ID information is missing.
The objective is to get all the Transaction IDs, along with the Customer Names, from all the files in the directory, in one text file. How can this be done ?
2 commentaires
per isakson
le 15 Mai 2020
You increase your chance to get a useful answer if you upload a few html-files that represent the cases.
- In some HTML files, both, the Customer Name and the Transaction ID information is missing.
- The transaction ID has varying length and is sometimes not available
- Sometimes there are multiple transactions.
- etc.
v k
le 15 Mai 2020
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Variables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!