having a stinker of a time writing an expression. ive managed to bodge it to work but i know it can be better.
(values im looking for are DealCards, DealFlop, DealTurn, DealRiver, ShowCards, MuckCards)
now occasionaly MuckCards will not have any data after it, but it is still added because it sees a </Action> later on in the file.
this is an example of data i need to catch
data i dont want to catch
data my RE pattern is currently catching, which is bad
any help will save my sanity.. thanks in advance
If somethings hard to do, its not worth doing - Homer Simpson
Code:
RE.Pattern = "(Deal|Show|Muck)(Cards|Flop|Turn|River)([\s\S]*?)<Card value=""([\s\S]*?)</Action>"
(values im looking for are DealCards, DealFlop, DealTurn, DealRiver, ShowCards, MuckCards)
now occasionaly MuckCards will not have any data after it, but it is still added because it sees a </Action> later on in the file.
this is an example of data i need to catch
Code:
<Action seq="3" type="DealCards" seat="7">
<Card value="2" suit="Diamonds"/>
<Card value="2" suit="Spades"/>
</Action>
Code:
<Action seq="14" type="DealFlop">
<Card value="7" suit="Hearts"/>
<Card value="6" suit="Hearts"/>
<Card value="King" suit="Diamonds"/>
</Action>
Code:
<Action seq="26" type="DealRiver">
<Card value="10" suit="Diamonds"/>
</Action>
data i dont want to catch
Code:
<Action seq="29" type="MuckCards" seat="7"[b]/>[/b]
data my RE pattern is currently catching, which is bad
Code:
<Action seq="34" type="MuckCards" seat="4"/>
<Action seq="35" type="Check" seat="1"/>
<Action seq="36" type="Check" seat="2"/>
<Action seq="37" type="DealTurn">
<Card value="5" suit="Clubs"/>
</Action>
any help will save my sanity.. thanks in advance
If somethings hard to do, its not worth doing - Homer Simpson