E hōʻoia i ka ikaika o ka ʻōlelo huna me JavaScript a me nā Manaʻo mau

Ke hana nei wau i kahi noiʻi e pili ana i ka loaʻa ʻana o kahi laʻana maikaʻi o kahi māka ikaika ikaika e hoʻohana ai i ka JavaScript a me nā Manaʻo Hōʻike (Regex). I ka palapala noi i kaʻu hana, hana mākou i kahi pou i hope e hōʻoia i ka ikaika o ka ʻōlelo huna a he kūpono ʻole ia no kā mākou mea hoʻohana. He aha ka Regex? ʻO kahi hōʻike maʻamau kahi kaʻina o nā huapalapala e wehewehe ai i kahi huli hulina. ʻO ka maʻamau, hoʻohana ʻia ia ʻano e nā string algorithms e ʻimi a loaʻa a loaʻa paha

E hōʻoia i ka leka uila me ka JavaScript a me nā ʻōlelo maʻamau

I kekahi manawa i hala aku nei ua kau wau i kahi Kaha ikaika ʻIke me ka hoʻohana ʻana iā JavaScript a me nā Manaʻo mau. Ma kēlā memo like, hiki iā ʻoe ke nānā i ke ʻano o kahi leka uila e hoʻohana nei i ka hana maʻamau (regex) ʻano hana. Inā loaʻa ka palapala id = "emailaddress" i kāu palapala palapala a hoʻohui ʻoe i kahi palapala onSubmit = "hōʻoia hōʻoiaEmail ();", he hana Javascript kēia e hiki ai iā ʻoe ke hoʻohana no ka hoʻihoʻi ʻana i kahi leka inā loaʻa kahi kūlana kūpono o ka leka uila a ʻaʻole paha:

Lōʻihi Wae Leka Uila

Ua pono wau e hana i kahi ʻeli ʻana i kēia lā e ʻike, akā ua ʻike anei ʻoe i ke ʻano o ka lōʻihi o kahi leka uila? Ua haki maoli ʻia i nā ʻāpana ... Name@Domain.com. ʻO kēia e like me RFC2822. Hiki i ka inoa ke 1 a 64 mau huapalapala. Hiki i ka Domain ke 1 a 255 mau huapalapala. Wow ... i mea i keia hiki ia i ka henua pololei leka uila wahi: loremaipsumadolorasitaametbaconsectetueraadipiscin gaelitanullamc @ loremaipsumadolorasitaametbaconsect etueraadipiscingaelitcaSedaidametusautanisiavehicu laaluctuscaPellentesqueatinciduntbadiamaidacondimn tumarutrumbaturpisamassaaconsectetueraarcubaeuatin ciduntaliberoaaugueavestibulumaeratcaPhasellusatin ciduntaturpisaduis.com E ho'āʻo pono ana ma luna o ka hana kāleka! ʻO ka mea mahalo, ʻoi loa