Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Regexy - Listowanie :(
pieto
post
Post #1





Grupa: Zarejestrowani
Postów: 227
Pomógł: 1
Dołączył: 12.05.2002
Skąd: gdańsk

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


Witam, kto by mi pomógł "sparsować"
takie coś


Kod
# Numbered lists are also good
## very organized
## easy to follow
#A newline
#in a list  
marks the end of the list.
#New numbering starts
#with 1


na takie coś

  1. <ol>
  2. <li>Numbered lists are also good
  3. <ol>
  4. <li>very organized</li>
  5. <li>easy to follow</li>
  6. </ol>
  7. </li>
  8. <li>A newline</li>
  9. <li>in a list</li>
  10. </ol>
  11. <p>marks the end of the list.</p>
  12. <ol>
  13. <li>New numbering starts</li>
  14. <li>with 1.</li>
  15. </ol>


Wiem że chodzi o preg_replace, ale sobie nie radzę (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

----edit----
Proszę używać bbCode.
~mike_mech
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 4)
hwao
post
Post #2


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




To nie bedzie takie proste (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Trzeba bedzie pozadny algorytm (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) (imho)

najlepiej file" title="Zobacz w manualu php" target="_manual() (ew. przetworzona tablica/obiekt) i sprawdzanie wszytkiego w funkcji rekurecyjnie
Go to the top of the page
+Quote Post
Major
post
Post #3





Grupa: Zarejestrowani
Postów: 82
Pomógł: 0
Dołączył: 22.07.2004

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


Cytat
Trzeba bedzie pozadny algorytm

Pożądny? Każdy algorytm musi być porządny (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)

Jeżeli tag poprzedzający tekst jest inny od wczesniejszego otwierasz <ol> i zamykasz stary, jeśli nie ma żadnego dajesz <p> (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
pieto
post
Post #4





Grupa: Zarejestrowani
Postów: 227
Pomógł: 1
Dołączył: 12.05.2002
Skąd: gdańsk

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


aha... a moze ktos by tak pomogl skonstruować ? (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post
NuLL
post
Post #5





Grupa: Zarejestrowani
Postów: 2 262
Pomógł: 21
Dołączył: 3.05.2004
Skąd: Sopot, Krakow, W-wa

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


Tu nikt kodu na zamówienie nie pisze.
Go to the top of the page
+Quote Post

Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 10.10.2025 - 02:11