Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Wiele wyrażeń regularnych najlepsze rozwiązanie
andrzejb
post
Post #1





Grupa: Zarejestrowani
Postów: 93
Pomógł: 1
Dołączył: 12.08.2005

Ostrzeżenie: (10%)
X----


mam taki ciąg z ktorego pogrubione dane, chcialbym wyprowadzic jak najbardziej efektywnie do tablicy

  1. <?php
  2. $txt="Input #0, avi, from 'lolly.avi':
  3. Duration: 00:00:24.9, start: 0.000000, bitrate: 331 kb/s
  4. Stream #0.0: Video: mpeg4400x32025.00 fps
  5. Stream #0.1: Audio: pcm_u88000 Hz, mono64 kb/s
  6. Must supply at least one output file";
  7. ?>


zaczynam od Duration:
  1. <?php
  2. preg_match('/Duration:(.*?:)+/',$txt, $matches);
  3. print_r($matches);
  4.  
  5. $info['mov']['duration']=$matches[0];
  6.  
  7. Array ( [0] => Duration: 00:00:24.9, start: 0.000000, bitrate: [1] => 0.000000, bitrate: ) 
  8.  
  9. ?>


gdzie robie blad ?


--------------------
web lowcy.com.pl gg 1675677
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 20:21