forgetabout Posted November 12, 2006 Report Share Posted November 12, 2006 (edited) Sanāca uzrakstīt šādu : preg_match("#(^[a-zа-я0-9]+$$)#i", $takeup)) + vajadzētu, lai var izmantot "_", "-", "=" ":" ")" un arī atstarpes. edit : vai man ar а-я ir ok? nebūs problēmu ar kirilicu? Edited November 12, 2006 by forgetabout Link to comment Share on other sites More sharing options...
andrisp Posted November 12, 2006 Report Share Posted November 12, 2006 (edited) а-я ? Bet vispār pieraksti vienkārši klāt: preg_match("#(^[a-zа-я0-9_,\.\-=:\s]+$$)#i", $takeup)) Kāpēc tev ir divi $ ? Not sure, vai tā ir pareizi. Edited November 12, 2006 by andrisp Link to comment Share on other sites More sharing options...
forgetabout Posted November 12, 2006 Author Report Share Posted November 12, 2006 (edited) Nu, jā "а-я" kirilicas alfabēts :) (абвгдежзийклмнопрстуфхцчшщъьюя & АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯ) Par diviem $ es arī nezinu, tādu piemēru biju atradis un pieliku savu daļu klāt :) Edited November 12, 2006 by forgetabout Link to comment Share on other sites More sharing options...
andrisp Posted November 12, 2006 Report Share Posted November 12, 2006 Es nezinu, varbūt tev strādā tāpat, bet, ja ne, tad iespējams jāpieliek u modifieris klāt (http://lv2.php.net/manual/en/reference.pcre.pattern.modifiers.php). Link to comment Share on other sites More sharing options...
forgetabout Posted November 12, 2006 Author Report Share Posted November 12, 2006 (edited) Es te tā paštukoju un izdomāju, ka vajadzētu tādu, kur var kirilicu, a-z, 0-9 un atstarpi. Uzgāju tādu : <?php preg_match ("/[А-Яа-яA-Za-z]keyword[А-Яа-яA-Za-z]/"); ?> Bet nesapratu tādu :/ Edited November 12, 2006 by forgetabout Link to comment Share on other sites More sharing options...
john.brown Posted November 12, 2006 Report Share Posted November 12, 2006 (edited) /^[\s\d\w\.-=]+$/ ar kirilicu ar strādā, vismaz utf8 un php ar multibit funkcijām Edited November 12, 2006 by john.brown Link to comment Share on other sites More sharing options...
Recommended Posts