正規表現を智能生成・解説し、様々な一般的なパターンマッチングをサポート
テキスト指示を数式に変換するか、数式の説明を取得します。
AIと会話してオンラインでExcelを編集します
テキスト指示をSQLクエリに変換します。
タスクを自動化し、Microsoft Excel内でカスタムソリューションを作成するためのExcel VBAコードを生成します。
Excelファイルをアップロードし、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]*)?
この正規表現は以下をサポートします: