iamtheyammer

regex for domain matches

Jan 9th, 2019
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. ^https?\:\/\/([a-z]+\.)?(domain)+\.(tld)[\/]?
  2.  
  3. example:
  4.  
  5. ^https?\:\/\/([a-z]+\.)?netflix+\.com[\/]?
  6. translates to: *.netflix.com/*
  7. matches:
  8. http://www.netflix.com
  9. https://www.netflix.com
  10. http://netflix.com
  11. http://netflix.com/
  12. https://netflix.com/
  13. http://asubdomain.netflix.com/
Add Comment
Please, Sign In to add comment