Javascript regex not matching - full code included -
I have posted this query first and got the answer included but I can not find this query match - I I am using. What am I missing on earth? (Copy / color) should be
& lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transcription // N" "http://www.w3.org/TR /xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" src = "https://code.jquery.com/jquery-latest.min.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script type = "text / javascript" & gt; $ ('Keyboard', function () {$ ('# out1'). Val ($ (this) .val (). Match (/ (? =. * [AG]) (? =. * [AG] ) (? =. * \ D) (? =. * ([^ \ W] | _)). {8,} /));}) Out & lt; Input id = "out1" /> & Lt; / Body & gt; & Lt; / Html & gt;
mail () returns to Aarera first and only Use the index to get the value, which is the whole match. $ (this) .val (). Match (/ (? =. * [Az]) (? = * [AZ]) (= * \ d) (= * ([^ \ w] | _?.?.)) {8,} /) [ 0]) .. // index and lieutenant; ----------------- ^ and use your code within the DOM, since that element is not yet present at that point.
$ (document) .ready (function () {$ ('# inp1'). ('Keyup', function () {$ ('# out1'). Val ($ ( This) .val (). Match (/ (? =. * [Az]) (? =. * [AZ]) (? =. * \ D) (? =. * ([^ \ W] | _) ). {8,} /) [0]);})});
Comments
Post a Comment