擅长:python、mysql、java
<p>使用这个长正则表达式,您可以在8个组中找到数据:</p>
<pre><code>(.*-.*)\s-\s.*\n(\w{3})\s*(\d+\/\d+)\s*\d+\s*(\w+)\s*(\d+\.?\d*)\s*\n(\d+\:\d+\w\w)\s*\d+\s*(\w+)\s*(\d+\.?\d*)
Full match 0-104 `BPZ vs Griffin - League of Legends - Challenger Korea Sat 2/25 1511 BPZ 1.645
10:30PM 1512 Griffin 2.250`
Group 1. n/a `BPZ vs Griffin - League of Legends`
Group 2. n/a `Sat`
Group 3. n/a `2/25`
Group 4. n/a `BPZ`
Group 5. n/a `1.645`
Group 6. n/a `10:30PM`
Group 7. n/a `Griffin`
Group 8. n/a `2.250`
{'event':'$1',
'outcome1':'$4',
'outcome2':'$7',
'outcome1odds':$5,
'outcome2odds':$8,
'date':'$2 $3',
'time':'$6'}
</code></pre>
<p><a href="https://regex101.com/r/2IdfnB/2" rel="nofollow noreferrer">https://regex101.com/r/2IdfnB/2</a></p>