SHOUTcast Total Time Spent Listening reportを解析するために正規表現を使用しようとしています。
サンプル文字列:
#1 6,916,236.75 32,000,555 4,587,363 COOLfahrenheit 93
#2 4,457,026.25 3,328,957 1,168,349 idobi Radio: New. Music. Unfiltered. [url redacted]
正規表現:
^\S+\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$
Rubularの下では、これは以下を返します。
Match 1
1. 6,916,236.75
2. 32,000,555
3. 4,587,363
4. COOLfahrenheit 93
Match 2
1. 4,457,026.25
2. 3,328,957
3. 1,168,349
4. idobi Radio: New. Music. Unfiltered. [URL redacted]
ただし、Python の で使用するとre.search()
、None
が返されます。私は何を間違っていますか?