본문으로 건너뛰기
Redmoon Converters
⚙️ 개발자 도구

쉬운 설명이 있는 정규표현식 테스터

매치 강조 표시와 각 토큰에 대한 쉬운 설명으로 어떤 정규표현식이든 실시간 테스트하세요. 일반 패턴 라이브러리(이메일, URL, IPv4, 전화번호)와 공유 가능한 링크를 제공합니다.

매치

매치 목록

#매치인덱스그룹

쉬운 설명

    계산 원리

    매칭에는 JavaScript 네이티브 RegExp 엔진을 사용합니다. 설명 기능은 패턴을 토큰 단위로 하나씩 분석합니다: 문자 클래스(\\w \\d \\s), 수량자(* + ? {n,m}), 앵커(^ $ \\b), 그룹, 교대(alternation), 자주 쓰이는 이스케이프까지 다룹니다.

    잘못된 패턴은 오류로 중단되지 않고 안내 메시지로 표시됩니다. g 플래그를 사용하면 모든 매치를 찾을 수 있고, i 는 대소문자를 구분하지 않을 때 사용합니다.

    계산 원리

    Matching runs on your browser's own JavaScript RegExp engine, so results are exactly what new RegExp(pattern, flags) produces. With the g flag on, exec is called in a loop and every match is collected with its string index and capture groups; zero-length matches nudge lastIndex forward by one to avoid an infinite loop. The plain-English breakdown is separate: it walks the pattern character by character and labels each token it recognises.

    The six flag checkboxes are the quickest way to change behaviour. Only g is ticked by default, and it decides whether you get the first match or all of them; i, m, s, u and y are off. The pattern box starts with a simple email-shaped expression tested against a sentence containing three addresses. Five preset buttons, Email, URL, IPv4, US phone and ISO date, replace both the pattern and the test string together.

    Because this is the JavaScript flavour, PCRE-only syntax such as possessive quantifiers, recursion, or the \A and \z anchors will not behave the way it does in PHP, Python or Perl. The explainer is a flat left-to-right scan rather than a parse tree, so it never shows nesting, and it has no entry for lookbehind or named groups, breaking (?<=x) into a capturing group plus literals. Matching stops after 5,000 results and the table lists 200.

    자주 묻는 질문

    Why am I only getting one match?

    The g flag controls that. With g unticked the tool calls exec once and reports the first match only; tick it and the pattern is run repeatedly across the entire test string until no further matches remain. It is ticked by default.

    Does this tester support Python or PCRE regex syntax?

    It runs the JavaScript engine only. Everyday syntax behaves identically, but PCRE-specific constructs will either raise an error or match differently. Anything valid in a browser's RegExp constructor works, including the u and y flags exposed as checkboxes.

    How do I see what my capture groups matched?

    The match list table has a Groups column showing $1, $2 and so on for every match, with an empty-set symbol where a group took part in no match. Non-capturing groups written as (?:...) deliberately produce no entry there.

    What does the plain-English breakdown actually cover?

    Escapes such as \d, \w, \s and \b, the start and end anchors, the dot, alternation, capturing and non-capturing groups, positive and negative lookaheads, character classes, the three basic quantifiers and {n,m} ranges. Anything else is reported as a literal character.

    Is my test data sent to a server?

    No. The pattern and the test string are evaluated in your own browser by its built-in regex engine, with no upload and no server round trip. There is also no save or share link, so refreshing the page resets both fields to the defaults.

    다른 이름

    regex testerregex to englishregex explainerregex visualizer

    관련 도구