Jump to content

Ams Ile Regex Kullanımı


pairs
 Share

Recommended Posts

  • Editor

S.a arkadaşlar Regex nedir die burada anlatım yapmayacagım gerekli bilgiye netteki dökümanlardan ulaşabilirsiniz.Kısaca bahsedecek olursak meslea bir html dosyasını çektiniz netten içinden sadece likler sadece tarihler sadece mailler gibi regex türlerine göre veri çekebilirsiniz.Kendi regex deseninizide oluşturabilirsiniz.Ben bu örnekte sadece mailleri çeken bir regex desenini göstereceğim vede ams de nasıl kullanılır onu göstereceğim.

 

 

 

email="mailadresiniz"
if (email:match("[a-z][@][a-z]?")) then
 Dialog.Message("",email .. " adresi bulundu.")
end

 

burada arkadaşlar içinde arama yapacagım yazıyı yazdım. if koşulu ile içinde regex i arattım.Burada [a-z] demek ilk değeri a ile z arasında olacak sonraki değer @ işaretini alacak ve ondan sonraki değer yine harf içerecek ? işareti ise kelimenin sonu demek.Bu kodu örnek projenizde çalıştırdınız zaman size maill adresini gösterecektir.

Edited by pairs
Link to comment
Share on other sites

  • 2 hafta sonra ...
  • 1 ay sonra...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...