DevTools

正则表达式测试器

在 Ali Hub DevTools 中使用 正则表达式测试器,并获得清晰的验证、结果、隐私说明和已记录限制。

主要输入

仅当工具明确说明浏览器本地、带版本、限定范围、可清除且非敏感的数据时才使用存储。

安装此工具

将此工具添加到设备,以便快速访问。

正则表达式测试器

Test regular expressions against sample text online while reviewing matches, groups, flags, and engine differences. 简体中文 locale.

Make HTML structure easier to inspect

This tool tests a regular expression against sample text and displays matches or captures. It helps you explore pattern be...

Formatting is not HTML validation

A regular expression describes text patterns using literals, character classes, quantifiers, groups, anchors, alternation,...

How to format HTML

  1. Enter a pattern, choose flags or engine options, add representative text, and inspect matches and capture groups. Include ...
  2. Enter a pattern, choose flags or engine options, add representative text, and inspect matches and capture groups. Include ...

Formatting method

  • Read markup structure

    The tester compiles the pattern with selected options, scans the sample text, and reports matches, positions, and groups. ...

  • Apply indentation

    The tester compiles the pattern with selected options, scans the sample text, and reports matches, positions, and groups. ...

  • Preserve content

    The tester compiles the pattern with selected options, scans the sample text, and reports matches, positions, and groups. ...

Exact parser recovery, optional-tag handling, whitespace policy, embedded-language behavior, and error wording should be c...

Read the formatted result

A useful result shows the exact matched span, capture values, flags, and engine assumptions. Check whether a match is part...

常见错误

Common mistakes include forgetting anchors, using a dot for every character, misunderstanding greedy quantifiers, mixing e...

Common mistakes include forgetting anchors, using a dot for every character, misunderstanding greedy quantifiers, mixing e...

限制和特殊情况

The tester cannot guarantee production engine, performance, denial-of-service resistance, locale behavior, or full input c...

The tester cannot guarantee production engine, performance, denial-of-service resistance, locale behavior, or full input c...

Examples

Regex Tester online — 1

What does a regex tester do?

Enter a pattern, choose flags or engine options, add representative text, and inspect matches and capture groups. Include ...

A useful result shows the exact matched span, capture values, flags, and engine assumptions. Check whether a match is part...

Regex Tester online — 2

Which regex engine is used?

Enter a pattern, choose flags or engine options, add representative text, and inspect matches and capture groups. Include ...

A useful result shows the exact matched span, capture values, flags, and engine assumptions. Check whether a match is part...

Regex Tester online — 3

What are flags?

Enter a pattern, choose flags or engine options, add representative text, and inspect matches and capture groups. Include ...

A useful result shows the exact matched span, capture values, flags, and engine assumptions. Check whether a match is part...

Regex Tester online — 4

Why does a pattern match partially?

Enter a pattern, choose flags or engine options, add representative text, and inspect matches and capture groups. Include ...

A useful result shows the exact matched span, capture values, flags, and engine assumptions. Check whether a match is part...

Regex Tester online — 5

How do capture groups work?

Enter a pattern, choose flags or engine options, add representative text, and inspect matches and capture groups. Include ...

A useful result shows the exact matched span, capture values, flags, and engine assumptions. Check whether a match is part...

Regex Tester online — 6

Can regex validate an email?

Enter a pattern, choose flags or engine options, add representative text, and inspect matches and capture groups. Include ...

A useful result shows the exact matched span, capture values, flags, and engine assumptions. Check whether a match is part...

Frequently asked questions

What does a regex tester do?

Use the tester to inspect pattern behavior, then confirm syntax, performance, Unicode rules, and security in the actual en...

Which regex engine is used?

Use the tester to inspect pattern behavior, then confirm syntax, performance, Unicode rules, and security in the actual en...

What are flags?

Use the tester to inspect pattern behavior, then confirm syntax, performance, Unicode rules, and security in the actual en...

Why does a pattern match partially?

Use the tester to inspect pattern behavior, then confirm syntax, performance, Unicode rules, and security in the actual en...

How do capture groups work?

Use the tester to inspect pattern behavior, then confirm syntax, performance, Unicode rules, and security in the actual en...

Can regex validate an email?

Use the tester to inspect pattern behavior, then confirm syntax, performance, Unicode rules, and security in the actual en...

Are complex patterns safe?

Use the tester to inspect pattern behavior, then confirm syntax, performance, Unicode rules, and security in the actual en...

How do I test Unicode?

Use the tester to inspect pattern behavior, then confirm syntax, performance, Unicode rules, and security in the actual en...

References