Answers for "Which of the following regular expressions can be used to get the domain names (e.g. google.com, www.baidu.com) from the following sentence?"

1

use regex to get urls from string

/(?:(?:https?|ftp|file)://|www.|ftp.)(?:([-A-Z0-9+&@#/%=~_|$?!:,.]*)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:([-A-Z0-9+&@#/%=~_|$?!:,.]*)|[A-Z0-9+&@#/%=~_|$])/igm
Posted by: Guest on November-04-2020
0

regex to indentify url

(http|ftp|https)://([w_-]+(?:(?:.[w_-]+)+))([w.,@?^=%&:/~+#-]*[w@?^=%&/~+#-])?
Posted by: Guest on August-29-2020

Code answers related to "Which of the following regular expressions can be used to get the domain names (e.g. google.com, www.baidu.com) from the following sentence?"

Browse Popular Code Answers by Language