Venom Posted November 25, 2004 Report Posted November 25, 2004 nu tad taisi $allow=array(0,1,2,...,'a','b'...), $tmp=strlen($parole)+1; while(--$tmp>-1) if (!in_array($parole[$tmp],$allow)) { echo 'greizi'; break; }
raivis Posted November 25, 2004 Author Report Posted November 25, 2004 vai tik http://php.lv/f/ nav zelta bedre..
bubu Posted November 25, 2004 Report Posted November 25, 2004 (edited) NEIZDOĀS!uzrāda EROR.. jopcig. $password = "Aate65i0"; if (preg_match("/^[\w\d]{7,10}$/u", $password)) { echo "Parole sastāv no burtiem un/vai cipariem garumaa 7-10"; } else { echo "Parole ir greiza"; } Un ja domā, ka izmantojot sarkanas krāsas lielus burtus tev ātrāk palīdzēs, tad tu maldies. Edited November 25, 2004 by bubu
raivis Posted December 14, 2004 Author Report Posted December 14, 2004 ;) Bet ar šo viss ir līdzēts: $password = "sasffiw"; if (preg_match("/^[^A^Ā^B^C^D^E^Ē^F^G^Ģ^H^I^Ī^J^K^L^M^N^O^P^R^S^Š^T^U^V^W^Y^Z][a-z\d]{6,9}$/", $password)) { echo "Parole sastāv no burtiem un/vai cipariem garumaa 7-10"; } else { echo "Parole ir greiza"; }
raivis Posted December 14, 2004 Author Report Posted December 14, 2004 ļoti neskaisti12241[/snapback] Zinu! bet, kā lai saīsinu:? [^A^Ā^B^C^D^E^Ē^F^G^Ģ^H^I^Ī^J^K^L^M^N^O^P^R^S^Š^T^U^V^W^Y^Z]..
Recommended Posts