Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Problem z wyrażeniami reguralnymi (preg_match_all)
jasiek65
post
Post #1





Grupa: Zarejestrowani
Postów: 46
Pomógł: 0
Dołączył: 25.05.2010

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


Witam

Mam taki kod php:
  1. preg_match_all("@<TD NOWRAP class=st(?:9|11|15) ALIGN=LEFT(.*)>(.*)</TD>@s",$plik,$out);


A chcę wyciągnąć z takiego html:
  1. <TR>
  2. <TD NOWRAP class=st8 ALIGN=LEFT>
  3. 3
  4. </TD>
  5. <TD NOWRAP class=st9 ALIGN=LEFT>
  6. Tekst
  7. </TD>
  8. <TD NOWRAP class=st11 ALIGN=LEFT>
  9. jakiś tam tekst
  10. </TD>
  11. <TD NOWRAP class=st15 ALIGN=LEFT BGCOLOR=#F7F3D9>
  12. &nbsp;
  13. </TD>
  14. <TD NOWRAP class=st10 ALIGN=LEFT>
  15. &nbsp;
  16. </TD>
  17. </TR>



Chciałbym wyciągnąć tekst z zaznaczników, ale wyrzuca mi pustą tablicę.
Co robię źle?
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: 20.08.2025 - 10:58