As the title suggests, I\'m trying to retrieve the domain from a string using javascript regular expression.
Take the following strings:
String
You can use this regex in Javascript:
\b(?:(?:https?|ftp):\/\/)?([^\/\n]+)\/?