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
mike
post
Post #2





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

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: 5.10.2025 - 01:50