Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> wyrazenie regularne problem
pawel.s
post 26.09.2007, 10:37:07
Post #1





Grupa: Zarejestrowani
Postów: 69
Pomógł: 2
Dołączył: 15.08.2007
Skąd: trojmiasto

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


witajcie mam problem z wyrazeniem regularnym
nie wiem czy dobrze to napisalem prosze o odp
musze po prostu z kodu html wycignac pewny ciag i nie wiem gdzie jest bład
Warning: preg_match() [function.preg-match]: Unknown modifier 'd' in
  1. <?php
  2. preg_match('<div style=\"margin-left:20px; margin-top:20px; margin-bottom:5px; margin-right:20px;\">[[:alpha:]][[:punct:]]</div>',$find,$w);
  3. ?>


Ten post edytował pawel.s 26.09.2007, 10:51:41
Go to the top of the page
+Quote Post
Cienki1980
post 26.09.2007, 10:41:14
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 590
Pomógł: 40
Dołączył: 11.01.2007
Skąd: Centrum

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



Proszę zapoznać się z Tematyką i zasadami panującymi na forum Przedszkole i dodać poprawny tag do tematu.

W innym przypadku wątek zostanie zamknięty.


--------------------
404
Go to the top of the page
+Quote Post
tomeksobczak
post 26.09.2007, 12:30:34
Post #3





Grupa: Zarejestrowani
Postów: 139
Pomógł: 10
Dołączył: 6.07.2007
Skąd: opole

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


</div> => <\/div>

Ten post edytował tomeksobczak 26.09.2007, 12:31:01


--------------------
Go to the top of the page
+Quote Post
pawel.s
post 26.09.2007, 12:42:07
Post #4





Grupa: Zarejestrowani
Postów: 69
Pomógł: 2
Dołączył: 15.08.2007
Skąd: trojmiasto

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


dalej cos nie tak chodzi mi o to aby
  1. <?php
  2. <div style=&#092;"margin-left:20px; margin-top:20px; margin-bottom:5px; margin-right:20px;\">i tutaj mam mase roznego tekstu html i alfabet</div>
  3. ?>
potrzebuje wyrazenie regularne na to

Ten post edytował pawel.s 26.09.2007, 12:42:45
Go to the top of the page
+Quote Post
tomeksobczak
post 26.09.2007, 12:46:28
Post #5





Grupa: Zarejestrowani
Postów: 139
Pomógł: 10
Dołączył: 6.07.2007
Skąd: opole

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


caly pattern regexp w // a dodatkowo przed kazdym / stawiasz \
  1. <?php
  2. preg_match( '/<div>jakiś string</div>/', $x )
  3. ?>


--------------------
Go to the top of the page
+Quote Post
pawel.s
post 26.09.2007, 12:47:44
Post #6





Grupa: Zarejestrowani
Postów: 69
Pomógł: 2
Dołączył: 15.08.2007
Skąd: trojmiasto

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


tak stawiam
Go to the top of the page
+Quote Post
tomeksobczak
post 26.09.2007, 12:49:17
Post #7





Grupa: Zarejestrowani
Postów: 139
Pomógł: 10
Dołączył: 6.07.2007
Skąd: opole

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


Cytat(pawel.s @ 26.09.2007, 11:37:07 ) *
witajcie mam problem z wyrazeniem regularnym
nie wiem czy dobrze to napisalem prosze o odp
musze po prostu z kodu html wycignac pewny ciag i nie wiem gdzie jest bład
Warning: preg_match() [function.preg-match]: Unknown modifier 'd' in
  1. <?php
  2. preg_match('<div style=\"margin-left:20px; margin-top:20px; margin-bottom:5px; margin-right:20px;\">[[:alpha:]][[:punct:]]</div>',$find,$w);
  3. ?>


nie widze / pomiedzy ' a <div


--------------------
Go to the top of the page
+Quote Post
pawel.s
post 26.09.2007, 13:10:48
Post #8





Grupa: Zarejestrowani
Postów: 69
Pomógł: 2
Dołączył: 15.08.2007
Skąd: trojmiasto

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


juz sobie poradzilem dzieki
  1. <?php
  2. preg_match("/<div style=\"margin-left:20px; margin-top:20px; margin-bottom:5px; margin-right:20px;\">(.*?)</div>/si",$find,$w);
  3. ?>
Go to the top of the page
+Quote Post
Cysiaczek
post 26.09.2007, 13:19:32
Post #9





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Następnym razem otrzymasz +10% do ostrzeżeń za ignorowanie próśb moderatorów

Zamykam. Gdybyś chciał ponownie otworzyć, to prosze przesłać któremuś moderatorowi poprawiony tytuł na PW


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 13.08.2025 - 23:03