Extract domain from text in Mandarin

From LemonWiki共筆
Revision as of 15:16, 28 March 2025 by Planetoid (talk | contribs) (Created page with "== 從文章內容,擷取網址中的網域部分 == === 使用 Google sheet 擷取網域 === 使用 Google 試算表 [https://support.google.com/docs/answer/3098244?hl=zh-Hant REGEXEXTRACT] 函數 <pre> =REGEXEXTRACT(A1, "(http[s]?\://[^/]+)") </pre> 輸入: <pre> Yahoo! 新聞 https://tw.news.yahoo.com/abc </pre> 輸出: <pre> https://tw.news.yahoo.com </pre> 說明: # 網域指以 <nowiki>http://</nowiki> 或 <nowiki>https://</nowiki> 開頭,與相臨不是符...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

從文章內容,擷取網址中的網域部分

使用 Google sheet 擷取網域

使用 Google 試算表 REGEXEXTRACT 函數

=REGEXEXTRACT(A1, "(http[s]?\://[^/]+)")

輸入:

Yahoo! 新聞 https://tw.news.yahoo.com/abc

輸出:

https://tw.news.yahoo.com

說明:

  1. 網域指以 http:// 或 https:// 開頭,與相臨不是符號 / 的多個文字:[^/]+