页面

主题

工具

↑↓移动↵打开esc关闭
格式化 · 数据

正则测试器

把正则表达式应用到示例文本,实时高亮匹配、显示捕获组并预览替换结果。

完全在浏览器中运行 — 粘贴的内容不会被上传。

50 字符
//g
预设
164 字符
上下文中的匹配3 处匹配
Contact dev@ryuslog.com or support@ryuslog.dev for access. The docs@ryuslog.com mailbox is public, and the deploy runs at 2026-11-16T09:30:00Z with bearer 8b1c2f4a.
$1 $& ${name}
替换结果
173 字符 · 1 行
Contact dev at ryuslog.com or support at ryuslog.dev for access. The docs at ryuslog.com mailbox is public, and the deploy runs at 2026-11-16T09:30:00Z with bearer 8b1c2f4a.
匹配列表(3)序号 · 匹配 · 分组
  1. #1 · 8dev@ryuslog.com
    $1 dev$2 ryuslog.com
  2. #2 · 27support@ryuslog.dev
    $1 support$2 ryuslog.dev
  3. #3 · 63docs@ryuslog.com
    $1 docs$2 ryuslog.com

正则速查表

快速参考
\d \w \s .
数字、单词字符、空白,以及除换行外的任意字符。写成大写即为取反。
^ $ \b
输入开头、结尾和单词边界;锚点匹配的是位置而不是字符。
* + ? {n,m}
零次以上、一次以上、可有可无,以及明确的重复次数或范围。
( ) (?: )
捕获组把匹配内容记为 $1、$2;非捕获组只分组不记录。
(?=) (?!)
正向与负向前瞻:检查后面的内容但不消耗它。
g i m s
全局、忽略大小写、多行锚点、点匹配换行等标志。
全部 Python 指南