🔎 Smart Text Extractor

📐 工作原理与说明
取当前模式对应的全局正则(带 g 标志)并重置 lastIndex,循环 exec 收集全部匹配项;结果以换行连接输出,同时生成带序号与复制按钮的匹配列表;无匹配时提示「无匹配项」,输入为空则清空输出

Pull key fragments such as emails, phone numbers, links or custom patterns out of long pasted text, filtering noise and removing duplicates for fast data collection.

📚 深度解析:文本提取(正则)

💡 常见使用场景

  • 按模式从杂乱文本抽取目标:用正则表达式提取符合规则的片段,如订单号、手机号。
  • 日志关键信息抽取:从大段日志里捞出报错行或特定字段。
  • 数据预处理:为后续表格化先做结构化抽取。
抽取订单号
在长文本里用正则「ORD[0-9]{6}」抽取,得到 ORD100234、ORD100235 等全部订单号列表,可一键导出进一步处理。

❓ 常见问题(FAQ)

不会写正则怎么办?
优先用专用提取工具(邮箱/URL/数字等)免写正则;确需自定义时,常用语法如 [0-9] 数字、. 任意、* 重复可在说明里查,或先用小样本试。
多行匹配怎么设?
默认单行;需跨行抽取时开启多行/点号匹配模式(dotall),并注意换行符处理,否则匹配会断。

Formula & Standard References

Item Formula / Note Source / Standard
Extraction types common targets are email URL phone number and date each with its own grammar RFC 5322, internet message format
Boundary handling results are trimmed at word boundaries and deduplicated Unicode UAX #29, word boundaries
Order preservation first occurrence order is kept after deduplication for traceability Unicode UTS #10, collation algorithm
⚠️ 使用说明与注意事项