我已经复制了一个regex表达式,如下所示:
^(\*|http|https|file|ftp|ws|wss|data):\/\/(\*|(?:\*\.)?(?:[^*]+))?\/(.*)$
它可以匹配URL模式,如https://www.google.com/或https://*.google.com/,我想支持达到https://www.google.*/,我如何改变正则表达式?
https://www.google.com/
https://*.google.com/
https://www.google.*/
wrrgggsh1#
^(\*|http|https|file|ftp|ws|wss|data):\/\/(\*|(?:\*\.)?(\*|(?:[^*]+)))?\/(.*)$
1条答案
按热度按时间wrrgggsh1#