工具星球ToolPlanet

正则表达式测试Regular Expression Tester

在本地隔离线程测试 JavaScript 正则,查看匹配位置、捕获组与命名组。Test JavaScript regular expressions, positions, capture groups and named groups, with worker isolation and timeout protection.

g 全局 · i 忽略大小写 · m 多行 · s 点匹配换行 · u Unicode · y 粘连。使用 JavaScript 正则语法。

匹配结果

找到 0 个匹配

位置从 0 开始,按 UTF-16 代码单元计数。计算模块加载完成后,单次匹配超过 1 秒自动终止。最多展示 1000 项,结果总文本不超过 100 万字符。

正则表达式测试使用指南Regular Expression Tester: guide

在线测试 JavaScript 正则表达式,查看匹配结果、匹配位置、捕获组与命名组,使用独立线程和超时保护处理表达式。Test JavaScript regular expressions, positions, capture groups and named groups, with worker isolation and timeout protection.

  1. 填写正则表达式、匹配标志和测试文本。Enter a pattern, flags and test text.
  2. 查看匹配位置与捕获内容,根据错误提示调整表达式。Inspect matches or adjust the pattern using error messages.

与 Python、Java 的正则语法完全相同吗?Is the syntax the same as Python or Java?

不完全相同。本工具使用浏览器 JavaScript 正则引擎,其他语言的语法和标志可能不兼容;复杂表达式可能触发超时保护。Not completely. This uses the browser JavaScript regex engine. Other engines may differ, and complex expressions can reach the timeout limit.

免费使用,无需注册。工具输入在浏览器本地处理;网站访问统计不包含工具输入内容。Free to use, no registration. Tool input is processed locally in your browser and is not included in website analytics.