0
hello, I am trying to make a program but I am not able to remove the data from the file . txt, would be more or less these in bold.
PokerStars Hand #135235596385: Tournament #1228747530, $0.23+$0.02 USD Hold'em No Limit - Level I (10/20) - 2015/05/14 3:30:05 BRT [2015/05/14 2:30:05 ET]
guy. I have to get the 'Hand' key with the dice after '#' ending in ':', the same thing for 'Tournament' caught data after '#' and ending in ',' to save in a dictionary...
d = {'Hand' 135235596385, 'Tournament' 1228747530 }
would be more or less that.
What have you tried? Is there a pattern to the data or content you want to extract?
– Sergio
I don’t understand the regex rsrs, the Padra would be... in the first linham after "Hand #" catch "135235596385" after "Tournament #" catch "1228747530" I think that only with this already gives me to turn around and implement to get the other data.
– Adelson Inácio
Provide an example on the question (click the edit button) of how the "extracted" data should look inside the array.
– Guilherme Nascimento
Adelson, the question remains very vague. Take a look here: https://regex101.com/r/lZ4vZ9/1. and you can [Edit] the question to add more details to clarify.
– Sergio
@Adelsoninácio, you only need the regex to get this number?
– haykou
I don’t think so, however it is best to take this data.
– Adelson Inácio
@Adelsoninácio, well I don’t know if this is what you need, but to always get what comes after Tournament #, would look like this ((?<=Tournament s#) d*) , the same thing for the Hand, that’s what it needs?
– haykou