Hello, Can anyone assist with a regex to pull lottery numbers from a page? The following is one example I have tried:
All data from the web page is pushed into an array. ( Header and footer info is removed before being pushed into the array.) The entire goal here is an exercise I was playing with to produce a report of the most common winning lottery numbers. What I will need to be able to do is place the most common 5 numbers (before the word "powerball") into an array then place the powerball numbers into another array. Thanks in advance. @liners = split /(\s\[0-9],\s)Powerball:\s[0-9]/,$data_string; _DATA_ 22, 29, 35, 46, 52, Powerball: 2, Power Play: 5 1, 31, 38, 40, 53, Powerball: 42, Power Play: 2 6, 16, 18, 29, 37, Powerball: 24, Power Play: 2 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/