Regex 替换
使用正则表达式批量替换文本
🔒 100% client-side — your data never leaves this pageRegex Replace
Output
Replaced text will appear here
🔒 100% client-side
About this tool
通过正则表达式完成高级文本替换,支持 pattern、flags 与 replacement 配置,并实时展示替换结果与匹配数量。适合日志清洗、模板重构、批量文本处理和数据标准化任务,提升开发与运营效率。
Frequently Asked Questions
What regex flags are supported?
Common JavaScript regex flags such as g, i, m, s, u, and y are supported.
Can I use capture groups in replacement?
Yes. You can use references like $1, $2 in replacement text.
Does this tool modify files directly?
No. It only transforms the text you paste into the input area.