🔍 Line Filter
包含
不包含
以...開頭
以...結尾
完全匹配
正則匹配
長度大於
長度小於
原始: 0 行
結果: 0 行
📋 結果
請輸入文本...
📚 深度解析:按條件過濾行
💡 常見使用場景
- 日誌篩選:只保留含「ERROR」或排除「DEBUG」的行,聚焦問題。
- 名單處理:按關鍵詞包含/不包含過濾,得到目標子集。
- 資料預處理:過濾掉空行或特定字首行,準備下遊處理。
只留錯誤日誌
貼上 5000 行日誌,設「包含 ERROR」,輸出僅 23 行錯誤;再疊加「排除 timeout」可進一步排除已知噪聲。
❓ 常見問題(FAQ)
- 支援正則嗎?
- 支援。簡單子串與正則模式兩種;複雜條件(如「A 且非 B」)可用正則或組合多次過濾實現。
- 大小寫敏感嗎?
- 預設敏感,可開忽略大小寫;「error」與「ERROR」在敏感模式下是兩條不同匹配。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Regex syntax | line filtering uses regular expressions in either ECMAScript or POSIX dialect | ECMA-262, regular expressions |
| Anchor semantics | line anchors match per line and require the multiline flag | IEEE 1003.1, POSIX regular expressions |
| Inverse filtering | exclusion and inclusion are complements summing to the total line count | IEEE 1003.1, POSIX regular expressions |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準