智慧產生和解釋正規表示式,支援各種常見模式比對
將您的文字指令轉換為公式,或輸入公式獲取解釋。
透過和 AI 對話來線上編輯 Excel
使用 AI 將您的文字指令轉換為 SQL 查詢語句。
產生 Excel VBA (Visual Basic for Applications) 程式碼,用於自動化任務和建立 Microsoft Excel 中的自訂解決方案。
上傳您的 Excel 檔案,使用我們的 AI 驅動的圖表產生器產生漂亮的圖表。
使用我們的 AI 驅動的心智圖產生器將您的文字轉換為漂亮的心智圖。輕鬆編輯和自訂您的心智圖。
使用 AI 智慧產生和解釋正規表示式,支援各種文字模式比對和資料驗證。
使用AI根據文字描述生成精美圖片,支援多種尺寸,免費
http://www.example.com
https://example.com/path?query=123
ftp://ftp.example.org/resource.txt
www.example.com
example.com
以下正则表达式可匹配绝大多数标准 URL:
\b((?:https?|ftp):\/\/)?(?:www\.)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(?:\/[^\s]*)?
import re
text = """
Visit our site at https://www.example.com or follow the docs at http://docs.example.org/page.
Also check ftp://ftp.example.com/file and plain www.test.com or example.net for more.
"""
pattern = r'\b((?:https?|ftp):\/\/)?(?:www\.)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(?:\/[^\s]*)?'
urls = re.findall(pattern, text)
print(urls)
const text = `
Check https://www.example.com, http://example.org, ftp://files.example.net,
and also www.test.com or just example.co.
`;
const regex = /\b((?:https?|ftp):\/\/)?(?:www\.)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(?:\/[^\s]*)?/g;
const urls = text.match(regex);
console.log(urls);
import java.util.regex.*;
import java.util.*;
public class URLMatcher {
public static void main(String[] args) {
String text = "Visit https://example.com or ftp://ftp.example.org.";
String regex = "\\b((?:https?|ftp):\\/\\/)?(?:www\\.)?[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}(?:\\/[^\\s]*)?";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(text);
while (matcher.find()) {
System.out.println(matcher.group());
}
}
}
\b((?:https?|ftp):\/\/)?(?:www\.)?[a-zA-Z0-9.-]+\.(?:[a-zA-Z]{2,})(?::\d{1,5})?(?:\/[^\s]*)?
此正则支持: