<!DOCTYPE html>      
<html lang="en">      
<head>      
    <meta charset="UTF-8">      
    <title>匹配域名</title>    
    <style type="text/css">
    </style>     
</head>      
<body>
	<script type="text/javascript">
		var str="https://www.baidu.com/s?cl=3";
		var reg=/https:\/\/([A-Za-z\.]+)\/\S+/;
		var result=reg.exec(str);
		if(result) {
		  console.log(result[1]);
		}
	</script>
</body>      
</html> 

相关文章:

  • 2022-12-23
  • 2021-12-03
  • 2022-03-04
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-02-18
猜你喜欢
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案