Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> dodawanie \ przed \
Jim
post
Post #1





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 27.07.2005

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


Witam,
mam problem z formularzem. Chciałbym aby po wpisaniu w pole np.:
Kod
^([a-z0-9_]|\\-|\\.)

i przekazaniu tego tekstu w zmiennej $_POST['cos'] był dokladnie ten sam tekst.

Aktualnie to jest tak, że po wcisnięciu submit w zmiennej jest taki oto string:
Kod
^([a-z0-9_]|\\\\-|\\\\.)


z góry dzięki za pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 6)
kszychu
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 712
Pomógł: 23
Dołączył: 27.10.2003
Skąd: z kontowni

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


potraktuj to funkcją stripslashes()
Go to the top of the page
+Quote Post
Jim
post
Post #3





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 27.07.2005

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


wielkie dzięki,
eregi_tester już skończony teraz tylko eregi_db i bede cały happy (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Go to the top of the page
+Quote Post
bendi
post
Post #4





Grupa: Zarejestrowani
Postów: 401
Pomógł: 5
Dołączył: 14.09.2003
Skąd: Wrocław

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


Cytat(Jim @ 2005-08-05 11:11:41)
wielkie dzięki,
eregi_tester już skończony teraz tylko eregi_db i bede cały happy (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)

Tak na marginesie - czemu eregi, pregi są szybsze.
Go to the top of the page
+Quote Post
Jim
post
Post #5





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 27.07.2005

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


Cytat
czemu eregi, pregi są szybsze.


nie wiem w sumie. zawsze uzywalem eregi.
A czym sie rozni np.: egegi od preg_match? z dokumentacji za duzo nie rozumiem, moglbys wyjasnic?
Go to the top of the page
+Quote Post
mike
post
Post #6





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

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


Cytat stąd: php Tips and Tricks
Cytat
ereg vs preg
When it comes to the regular expression functions, ereg* and preg*, the preg functions are the clear choice. The preg functions are generally twice as fast as their ereg counterpart. They also support more advanced regular expression operations. I can't think of any reason why you would need to use the ereg functions.

preg manual page and pattern syntax (long and confusing but pretty good).
Go to the top of the page
+Quote Post
bendi
post
Post #7





Grupa: Zarejestrowani
Postów: 401
Pomógł: 5
Dołączył: 14.09.2003
Skąd: Wrocław

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


Cytat(Jim @ 2005-08-05 13:11:14)
z dokumentacji za duzo nie rozumiem, moglbys wyjasnic?

Owszem
Go to the top of the page
+Quote Post

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: 22.08.2025 - 13:19