検索と置換
テキスト内の特定の文字列を検索し、別の文字列に一括変換する無料オンラインツールです。
How to Use
- Enter your text in the input area
- Type the text you want to find
- Enter the replacement text
- Choose options: case sensitive, whole word, or regex
- Click "Replace All" to replace all matches
Regex Examples
\d+- Match numbers\w+@\w+\.\w+- Match email addresseshttps?://\S+- Match URLs\s+- Match whitespace
主な機能
- 一括検索/置換: すべての一致項目を一度に変更
- 大文字小文字の区別: 大文字小文字を区別して検索
- 完全一致: 単語境界を考慮した正確なマッチング
- 正規表現サポート: 強力なパターンマッチング
- リアルタイム一致カウント: 見つかった一致項目数の表示
- 即座にコピー: 結果をワンクリックでコピー
オプション説明
大文字小文字の区別 (Case Sensitive)
入力: "Hello World, hello world"
検索: "hello"
大文字小文字の区別 OFF: 2個マッチ (Hello, hello)
大文字小文字の区別 ON: 1個マッチ (helloのみ)
完全一致 (Whole Word)
入力: "cat category catch"
検索: "cat"
完全一致 OFF: 3個マッチ (cat, cat in category, cat in catch)
完全一致 ON: 1個マッチ (catのみ)
正規表現使用 (Use Regex)
正規表現を有効にすると強力なパターンマッチングが可能になります。
正規表現の例
1. メールアドレスの検索
\w+@\w+\.\w+
マッチ: user@example.com, admin@site.org
2. 電話番号の検索
\d{3}-\d{4}-\d{4}
マッチ: 010-1234-5678
3. URLの検索
https?://[^\s]+
マッチ: http://example.com, https://site.com
4. 数字のみ検索
\d+
マッチ: 123, 456, 789
5. 空白の削除
検索: \s+
置換: (空文字列)
結果: すべての空白が削除される
6. 改行をカンマに変更
検索: \n
置換: ,
結果: 各行がカンマで区切られる
実用例
HTMLタグの削除
検索: <[^>]+>
置換: (空文字列)
入力:
<p>Hello <strong>World</strong></p>
<div>Test</div>
出力:
Hello World
Test
重複する空白の削除
検索: \s{2,}
置換: (空白1つ)
入力:
Hello World Test
出力:
Hello World Test
日付形式の変更
検索: (\d{4})-(\d{2})-(\d{2})
置換: $2/$3/$1
入力:
2024-01-15
2024-12-31
出力:
01/15/2024
12/31/2024
引用符で囲む
検索: (\w+)
置換: "$1"
入力:
apple banana cherry
出力:
"apple" "banana" "cherry"