All Tools csv_tools excel_tools pdf_tools word_tools image_tools text_tools networktools calculators

Regex Replace

Quickly match and replace text using regular expressions

1. Enter Text
Supports multiple lines
2. Regular Expression Settings
Enter the regular expression pattern
Enter replacement text (leave empty to delete matches)
Select matching options
📖 Regular Expression Reference (click to expand)
Meta Character Description Example
\dDigit\d+ → 123
\wWord character\w+ → abc123
\sWhitespace\s+ → space
.Any charactera.c → abc
*0 or morea* → or aaa
+1 or morea+ → aaa
|ORapple|banana
💡 Common Examples (click to expand)
  • Delete all numbers: Pattern \d+, Replace with (empty)
  • Delete specific word: Pattern ad|spam, Replace with (empty)
  • Mask phone number: Pattern (\d{3})\d{4}(\d{4}), Replace with $1****$2
  • Remove HTML tags: Pattern <[^>]*>, Replace with (empty)
  • Remove all spaces: Pattern \s+, Replace with (empty)
  • Replace multiple spaces with single space: Pattern \s+, Replace with
  • Replace email domain: Pattern @[\w.-]+, Replace with @example.com

Regex Replace User Guide

Regex replace tool uses regular expressions for text matching and replacement, supporting complex pattern matching and batch processing.

How to Use:

  1. Enter or paste text to process
  2. Enter the regular expression pattern
  3. Enter the replacement text (leave empty to delete matches)
  4. Select matching options (global, ignore case, multiline)
  5. Click "Replace" button

Use Regex Replace to easily handle complex text replacements!

小说合集!! 河清海晏 作者:橘子不酸.txt 小说合集 《斗破苍穹》(校对版全本)作者:天蚕土豆.txt 鸣龙.txt B-《不健全关系·梦信标》 【无损音乐分享】620首最火歌曲合集,高品质MP3-320K 河清海晏 作者:橘子不酸 【500w本小说】txt格式 经典老电影修复版 [更128]《重生后和宿敌结婚了 》作者:白羽摘雕弓.txt Yandex浏览器v24.7中文版 2026版初中《全品作业本》8年级上册(英语)(人教) 《村里有只白骨精》作者:清歌一片(穿越重生)(1).txt 人教版高中英语单词表超全大合集(PDF+TXT+WORD) 《为了和谐而奋斗》作者:西子绪.txt 1、小学道法 【单独教案】方便下载(1-6上下册) [附带番外]《被无情道小师弟倒追了》作者:风歌且行.txt [附带番外]《皇后是朕小青梅》作者:瞬息.txt 【小说合集】经典收藏知乎严选小说合集3万本.