a11y.skipToMainContent
1

Тестер Regex

Тестируйте регулярные выражения JavaScript в прямом эфире - см. совпадения, выделенные в вашем тексте, и захваченные группы в списке.

More options

Common Pattern Library

Click any pattern to load it into the tester:

Quick Regex Cheatsheet

Character Classes
. Any character
\d Digit [0-9]
\w Word char [a-zA-Z0-9_]
\s Whitespace
\D Non-digit
\W Non-word char
Anchors & Boundaries
^ Line start
$ Line end
\b Word boundary
\B Non-boundary
Quantifiers
* 0 or more (greedy)
+ 1 or more (greedy)
? 0 or 1 (optional)
*? 0 or more (lazy)
{n} Exactly n times
{n,m} n to m times
Groups & Lookarounds
(...) Capturing group
(?:...) Non-capturing group
(?=...) Positive lookahead
(?!...) Negative lookahead
Was this tool helpful?
Send output to:
Advertisement

How to use Regex Tester

  1. Введите свой регекс.
  2. Выбери флаги.
  3. Вставить тестовый текст — матчи выделить в прямом эфире.

Что такое имя?

Создавайте и отлаживайте регулярные выражения быстро: введите шаблон, переключите флаги (g, i, m, s, u) и посмотрите совпадения, выделенные в вашем тестовом тексте. Захваченные группы появляются рядом с каждым матчем для легкой проверки
Advertisement

FAQ

Какой регекс?
JavaScript regex (ECMAScript). Lookaheads, lookbehinds, классы персонажей, группы захвата, названные группы все поддерживаются.
Каков предел безопасности?
Капс на 100 000 матчей за пробежку, чтобы предотвратить бегство.

Related tools

Author

MW
Marcus Webb"The DevTool Craftsman"

Full-Stack Developer & Tools Architect

Marcus has been writing code since the dial-up era. He has contributed to open-source developer tools, built CI/CD pipelines for startups, and debugged production incidents at 3 AM more times than he would like to admit. His philosophy is that the best developer tool is the one that gets out of your way, and he writes about practical tooling that helps teams ship faster with fewer headaches.

Advertisement