Posted By

typomatic on 09/08/12


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

macster


Domain Regex


 / Published in: Regular Expression
 

Regular expression to pull the domain from a URL.

  1. /https?:\/\/(?:[-\w]+\.)?([-\w]+)\.\w+(?:\.\w+)?\/?.*/i

Report this snippet  

You need to login to post a comment.