Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to write regular expressions for replacement of the latest version of the URL

Shulou Source: shulou.com Published: 2022-06-02 03:43:08 10月03日 Update

This article mainly shows you "the latest version of URL replacement regular expression how to write", the content is easy to understand, clear, hope to help you solve your doubts, let the editor lead you to study and learn "the latest version of URL replacement regular expression how to write" this article.

Regular expression of the latest URL

(http://)?(\w+\.)(\w+\.)(\w+)(/\w+)*/?(.html)?|http://\w+\.\w+/\w+|[ "[] () () ★ requests @ ~ #] |\ s {2,}

The first part replaces the normal URL, the second part replaces the Weibo URL, the third part replaces the commonly used symbols, and the fourth part replaces more than two spaces with blanks.

The above is all the contents of the article "how to write regular expressions with the latest version of URL replacement". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: URL regular expression latest version content article section learning help commonly used easy to understand more organization knowledge spaces symbols part I ribbon industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Linux vpn Shulou Information Shulou Tech Info