Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [POMOCY] Problem z preg_match_all()
mejo33
post
Post #1





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 24.10.2010

Ostrzeżenie: (0%)
-----


Witam, mam problem z preg_match_all(), wydaje mi sie ze moze byc to bug...
raz mi wywala poprawnie, raz nie wywala nic, a raz wywala urwane dane... z tego samego stringu...

Co to moze byc? (IMG:style_emoticons/default/businesssmiley.png)

Kod:
  1. $URL = 'http://wotlk.theatreofdreams.pl/forum/mchat.php?mode=read';
  2. $content = file_get_contents($URL);
  3.  
  4. // returns $return['nick'] and $return['msg'] where i=msg/nick
  5. $regex = '(<div id.*(?P<color>\d|coloured)">(?P<nick>[A-Za-z0-9]+)</a>.*;">(?P<msg>.*)</div></div>)';
  6. preg_match_all($regex,$content,$return);
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 24.08.2025 - 13:36