Regex tester — test and preview replacements
Test and refine a regex against real text to make sure it behaves as intended. Syntax errors are explained in plain language, and you can click a common pattern to get started instantly.
The file is never sent to a server — processed entirely in this browser
/ /
Common patterns
Highlighting matches · 2
문의: [email protected], 010-1234-5678
담당자 [email protected] / 010 9876 5432
사업자번호 123-45-67890, 접수일 2026-10-01
| # | Match | Position |
|---|---|---|
| 1 | 010-1234-5678 | 23–36 |
| 2 | 010 9876 5432 | 68–81 |
Regex symbol cheat sheet
| . | 줄바꿈을 뺀 아무 글자 |
|---|---|
| \d \w \s | 숫자 / 영문·숫자·_ / 공백 (대문자는 반대) |
| [abc] [^abc] [가-힣] | 괄호 안 글자 중 하나 / 제외 / 한글 완성형 |
| ^ $ | 시작 / 끝 (m 플래그면 줄마다) |
| * + ? | 0번 이상 / 1번 이상 / 0~1번 |
| {3} {2,4} | 정확히 3번 / 2~4번 |
| *? +? | 가능한 적게 (게으른 반복) |
| (abc) (?:abc) | 캡처 그룹($1) / 캡처하지 않는 그룹 |
| (?<이름>…) | 이름 있는 그룹 ($<이름>) |
| a|b | a 또는 b |
| (?=…) (?!…) | 뒤에 …가 옴 / 오지 않음 |
| \b | 단어 경계 |
Uses your browser's native JavaScript regex engine. Be careful with nested-repetition patterns like (a+)+, as they can freeze the browser on long text.
Advertisement
How to use Test regex
- 1Enter a regex pattern and flags (g, i, m, s, u, y).
- 2Enter the text to check, and matches are highlighted with group values listed below.
- 3Enter $1 or $<name> in the replacement field to preview the result.
Frequently asked questions
What syntax does this use?
This is JavaScript (ECMAScript) regex. It's mostly the same as Python or Java, but some syntax, like possessive quantifiers, differs.
How do I write a Hangul character range?
For precomposed Hangul, use [가-힣]; to include individual consonants and vowels too, use [ㄱ-ㅎㅏ-ㅣ가-힣].
Advertisement