Aug-18-2019, 01:18 PM
Hello,
I have a HTML file from which I am trying to extract strings so that I can count them and then hopefully export the analysis of those results in the form of a table.
My HTML file has many "<div></div>" tags that house a repetitive unique pattern. The pattern is:
" to [Name of Player], "
The only thing that is standard in the above are the blank spaces before and after the 'to' along with the comma and space at the end. I need a way to get the full player name from the above pattern based on my HTML file.
The HTML File is as below
I have a HTML file from which I am trying to extract strings so that I can count them and then hopefully export the analysis of those results in the form of a table.
My HTML file has many "<div></div>" tags that house a repetitive unique pattern. The pattern is:
" to [Name of Player], "
The only thing that is standard in the above are the blank spaces before and after the 'to' along with the comma and space at the end. I need a way to get the full player name from the above pattern based on my HTML file.
The HTML File is as below
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
< / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 1.6 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 0 < / span>< / div> < / div> <div class = "description" >Archer to Fakhar Zaman, no run, wide ball prompts a rash swing from Fakhar. Bat nowhere near ball. Better over from England< / div> < / div><! - - react - text: 3750 - - > <! - - / react - text - - > < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 1.5 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 0 < / span>< / div> < / div> <div class = "description" >Archer to Fakhar Zaman, no run, beats the inside edge this time. Bit of swing for Archer. This has been a challenging over< / div> < / div><! - - react - text: 3758 - - > <! - - / react - text - - > < / div> <div class = "commentary-item pre " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 1.4 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 0 < / span>< / div> < / div> <div class = "description" >Archer to Fakhar Zaman, no run, beautiful bowling. Good length, at pace and swinging away from Imam's outside edge< / div> < / div> <div> <p class = "comment" > "Pakistan could learn a lot from the fearless approach of the Bangladeshi batsmen" , Nathan Barnes says. "Will they have the courage to take a risk? " < / p> < / div> < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 1.3 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 0 < / span>< / div> < / div> <div class = "description" >Archer to Fakhar Zaman, no run, shorter and wider, left alone this time< / div> < / div><! - - react - text: 3775 - - > <! - - / react - text - - > < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 1.2 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 4lb < / span>< / div> < / div> <div class = "description" >Archer to Fakhar Zaman, 4 leg byes, too straight, almost legsid - ish, and Fakhar flicks it off the hips to the fine leg boundary. This is a <strong>good start for Pakistan< / strong>< / div> < / div><! - - react - text: 3783 - - > <! - - / react - text - - > < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 1.1 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 1 < / span>< / div> < / div> <div class = "description" >Archer to Imam - ul - Haq, 1 run, immediate threat from Archer. Straighter, squared Imam up, an outside edge trickles through to third man< / div> < / div><! - - react - text: 3791 - - > <! - - / react - text - - > < / div> <div class = "commentary-item end-of-over" > <h4> <! - - react - text: 3794 - - >END OF OVER: <! - - / react - text - - > <div> <! - - react - text: 3796 - - > 1 | 9 Runs | PAK: 9 / 0 <! - - / react - text - - > <! - - react - text: 3797 - - >| RR: 9.00 <! - - / react - text - - > < / div> < / h4> <ul class = "two-col-table" > <li>Fakhar Zaman<span> 8 ( 4b )< / span>< / li> <li>Imam - ul - Haq<span> 1 ( 2b )< / span>< / li> < / ul> <ul class = "two-col-table" > <li>Chris Woakes<span> 1 - 0 - 9 - 0 < / span>< / li> < / ul> < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 0.6 < / div> <div class = "over-circle high-score" ><span class = "over-score" > 4 < / span>< / div> < / div> <div class = "description" >Woakes to Fakhar Zaman, <b>FOUR< / b> runs, <strong>slashed away< / strong> by Zaman. Got just a bit more room, fuller delivery angling away from the left - hander, and a slice gets it just wide of the man at point.< / div> < / div><! - - react - text: 3810 - - > <! - - / react - text - - > < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 0.5 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 0 < / span>< / div> < / div> <div class = "description" >Woakes to Fakhar Zaman, no run, driven to mid - off< / div> < / div><! - - react - text: 3818 - - > <! - - / react - text - - > < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 0.4 < / div> <div class = "over-circle high-score" ><span class = "over-score" > 4 < / span>< / div> < / div> <div class = "description" >Woakes to Fakhar Zaman, <b>FOUR< / b> runs, sliced away to the offside. Looked too close to cut, and there was no timing, but surprising misfield in the covers lets the ball squirt through to the boundary. Morgan the man who misfielded< / div> < / div><! - - react - text: 3826 - - > <! - - / react - text - - > < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 0.3 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 0 < / span>< / div> < / div> <div class = "description" >Woakes to Fakhar Zaman, no run, less room this time. Short and straighter, but Fakhar shoulders arms< / div> < / div><! - - react - text: 3834 - - > <! - - / react - text - - > < / div> <div class = "commentary-item " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 0.2 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 1 < / span>< / div> < / div> <div class = "description" >Woakes to Imam - ul - Haq, 1 run, similar line and length, cut away to third man, and Imam is up and running< / div> < / div><! - - react - text: 3842 - - > <! - - / react - text - - > < / div> <div class = "commentary-item pre " > <div class = "item-wrapper" > <div class = "over" > <div class = "time-stamp" > 0.1 < / div> <div class = "over-circle low-score" ><span class = "over-score" > 0 < / span>< / div> < / div> <div class = "description" >Woakes to Imam - ul - Haq, no run, wide outside off stump, Imam lets it go safely by< / div> < / div> <div> |