正则表达式测试器

隐私:所有正则匹配均在浏览器本地完成,不会上传任何数据。

正则表达式测试器

在线测试正则表达式,实时高亮匹配,内置模式说明、替换预览和常用模式库,完全本地运行。

标志: g 标志用于匹配高亮
匹配结果
  

匹配结果 (0)

  • 未找到匹配项

模式说明

  • 输入正则表达式查看说明
正则速查表
锚点
  • ^ start of line
  • $ end of line
  • \b word boundary
  • \B non-word boundary
  • \A start of input
  • \Z end of input
字符类
  • . any char (except newline)
  • \d digit (0-9)
  • \w word char (a-z, A-Z, 0-9, _)
  • \s whitespace
  • [abc] one of: a, b, c
  • [^abc] not one of: a, b, c
量词
  • * zero or more
  • + one or more
  • ? zero or one
  • {n} exactly n
  • {n,} n or more
  • {n,m} n to m
分组
  • (abc) capture group
  • (?:abc) non-capturing group
  • (?<name>abc) named group
  • a|b alternation
  • \1 backreference
环视
  • (?=abc) positive lookahead
  • (?!abc) negative lookahead
  • (?<=abc) positive lookbehind
  • (?<!abc) negative lookbehind

正则表达式测试器

在线测试正则表达式,实时高亮匹配,内置模式说明、替换预览和常用模式库,完全本地运行。

Tags: regex tester, regular expression, regex online, regex match, regex replace