![]() |
![]() ![]() |
![]() |
-mka- |
![]() ![]()
Post
#1
|
Goście ![]() |
jak skonstruować wyrażenie regularne dla funkcji preg_match() - sprawdzające czy string pasuje do formatu
0.00 gdzie zamiast o moze byc dowolna cyfra ? |
|
|
-mka- |
![]()
Post
#2
|
Goście ![]() |
|
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 40 Pomógł: 1 Dołączył: 29.12.2003 Skąd: Szczecin Ostrzeżenie: (0%) ![]() ![]() |
Cytat preg_match() returns the number of times pattern matches. That will be either 0 times (no match) or 1 time because preg_match() will stop searching after the first match. preg_match_all() on the contrary will continue until it reaches the end of subject. preg_match() returns FALSE if an error occurred.
(za duzo od jedno '=') -------------------- ''' ... Among the blind one eyed man is a king ... '''
|
|
|
![]()
Post
#4
|
|
![]() Grupa: Przyjaciele php.pl Postów: 5 724 Pomógł: 259 Dołączył: 13.04.2004 Skąd: N/A Ostrzeżenie: (0%) ![]() ![]() |
Skoro juz to porownoj do 1ki
albo chociaz
bo "== true" jest tu nadmiarowe, a tylko myli, bo preg_match nigdy takiej wartosci nie zwraca -------------------- Nie lubię jednorożców.
|
|
|
-mka- |
![]()
Post
#5
|
Goście ![]() |
dziala
![]() tylko przepuszcza np. takie cos 2.0093 a moze miec max. po kropce 2 cyfry - a przed jedna ... - jak to zmodyfikowac ? |
|
|
![]()
Post
#6
|
|
![]() Grupa: Zarejestrowani Postów: 28 Pomógł: 1 Dołączył: 3.12.2009 Ostrzeżenie: (0%) ![]() ![]() |
'/^[0-9]\.[0-9]{2}$/D'
-------------------- - WWW.GETICA.PL - strony WWW, logotypy, ilustracje - ZAPRASZAMY!
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 12:23 |