Parsing second hit possible?
-
Hey, i'm currently trying to parse some information from my source. I tried using LR method but unfortanely the left string is there two times but i only need the information starting from the second time this string appears. Otherwise i also parse a ton of useless information... Is there a method to just start a specific left string? Or do you know any other solution?
My Code:
<p><b>LEFT STRING:</b> {{random}}</p> {{else}} <p><b>LEFT STRING</b> {{random}}</p> {{/if}} <p>some text</p> {{else}} <p><b>LEFT STRING:</b> DATA I NEED</p><p> RIGHT STRING
What i Get:
</b> {{random}}</p> {{else}} <p><b>LEFT STRING</b> {{random}}</p> {{/if}} <p>some text</p> {{else}} <p><b>LEFT STRING:</b> DATA I NEED</p><p>
Instead of Just: DATA I NEED
Help is really appreciated. And sorry for a question on the first day in this forum, but i think also other people search a solution for this.
-
I suggest using CSS Selector when dealing with this kind of HTML ^_^ or regex, but it's going to be a bit harder. Don't use LR.
-
Maybe just create two prase variables, in first one try to prase the part of site where data you want to capture is located, then prase data you need out of first variable
According to the sample that you sent here, code like this should make a work
PARSE "<SOURCE>" LR "{{/if}}" "/p><p>" -> VAR "part1" PARSE "<part1>" LR "<b>LEFT STRING:</b> " "<" CreateEmpty=FALSE -> CAP "Capture"