Advertisement
MertcanGokgoz

Regex Code

Dec 20th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. Telefon Numarası Regex // Phone Number
  2. @"^(0[1-9](\d{2}) (\d{3}) (\d{2}) (\d{2}))$
  3.  
  4. Mail Adresi Regex //E-Mail Adress
  5. @"^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$"
  6.  
  7. Tarih Formatı Regex //Date
  8. @"(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])([1-2][0,9][0-9][0-9]))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)([/])([1-2][0,9][0-9][0-9]))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])([1-2][0,9][0-9][0-9]))|((29)(\.|-|\/)(02)([/])([02468][048]00))|((29)([/])(02)([/])([13579][26]00))|((29)([/])(02)([/])([0-9][0-9][0][48]))|((29)([/])(02)([/])([0-9][0-9][2468][048]))|((29)([/])(02)([/])([0-9][0-9][13579][26])))")
  9.  
  10. Sadece Rakam Girişine İzin Veren Regex // Only Number
  11. "[0-9]+$"
  12.  
  13. Sadece Harf Girişine İzin Veren Regex // Only Char
  14. "[A-Za-z]+$"
  15.  
  16. Sadece Harf ve Rakam Girişine İzin Veren Regex // Only Number And Char
  17. "[A-Za-z0-9]+$"
  18.  
  19. 32-Bit Renkler // 32-Bit Colors
  20. "(?:#|0x)?(?:[0-9A-F]{2}){3,4}"
  21.  
  22. URL Karşılaştırma // URL Matching
  23. "((https?|ftp)://)?(([^:\n\r]+):([^@\n\r]+)@)?((www\.)?([^/\n\r]+))/?([^?\n\r]+)?\??([^#\n\r]*)?#?([^\n\r]*)"
  24.  
  25. İp Adresi // IP Adress
  26.  
  27. "\b(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\.){3}(?:(?:2([0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9]))\b"
  28.  
  29. HTML Tag Temizleme // Clear HTML Tags
  30. "(<script(\s|\S)*?<\/script>)|(<style(\s|\S)*?<\/style>)|(<!--(\s|\S)*?-->)|(<\/?(\s|\S)*?>)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement