Regex: / /
Common:
Test text
일치
Enter a regular expression and some test text

정규식 테스터 & 치환 미리보기

Write the pattern and watch the matches appear: enter your expression and flags at the top, put the test text on the left, and see every match highlighted on the right along with its position and capture groups.

Below that you can preview a replacement using $1 and $2 backreferences, so you can iterate without switching tools.

Features

How to use

  1. Type the expression into the regex field and tick the g / i / m / s / u flags as needed.
  2. Paste the content to search into "Test text" on the left.
  3. Review the highlights and capture group details under "Matches" on the right.
  4. Switch to replace mode, enter a replacement template and check the preview.

FAQ

Which regex engine does this use?

The browser native JavaScript RegExp engine, following ECMAScript syntax. It is broadly compatible with Python, PCRE and Java, but features such as (?P<name>...) named groups and variable-length lookbehind differ, so keep that in mind when moving a pattern between languages.

Why does my pattern match nothing?

Three common causes: the g flag is off, so only the first occurrence can be found; special characters are unescaped — matching a literal dot requires \.; or m and s are unchecked, so ^, $ and . behave differently from what you expect.

What is the difference between greedy and lazy matching?

The quantifiers * and + are greedy by default and consume as much as possible. Appending a question mark makes them lazy (*? or +?), consuming as little as possible. Against <a><b>, the pattern <.+> matches the whole string while <.+?> matches only <a>.

Does the page record the patterns and text I enter?

No. Matching and replacement both run inside your browser, and your input is never sent to a server.

피드백

이 사이트는 프론트엔드 전용으로 백엔드나 계정 시스템이 없으며, 피드백은 GitHub Issues·Discussion·이메일로 받습니다.

이슈나 이메일에 붙여넣으면 문제 파악에 도움이 되며, 입력 내용은 포함되지 않습니다

Also: 기존 피드백 보기 · 이메일 피드백(GitHub 계정 불필요):278975598@qq.com