UtilitySansar
Text

Find and Replace (Regex)

Find and replace text in one paste — with literal matching or full JavaScript regex, case-sensitivity and whole-word toggles, multiline / dot-all / Unicode-aware flags, and capture-group references (`$1`, `$&`, `$\``) in the replacement. Watch the live match count update as you type so you know exactly what will change before you copy.

도구 요약

이 도구는 구조화된 입력을 받아 서버 업로드 없이 브라우저에서 결정적인 출력을 반환합니다.

도구 이름
Find and Replace (Regex)
입력 의도
변환·검증·분석할 원본 콘텐츠를 제공하세요.
출력 의도
복사, 재사용 또는 디버깅에 적합한 정규화된 출력을 받습니다.
예시 입력
The quick brown fox jumps over the lazy fox. Foxes are fast. Find: fox · Replace: cat · Whole word: on
예시 출력
The quick brown cat jumps over the lazy cat. Foxes are fast.
Recent inputs0

Your last 5 inputs will appear here.

3 matches
The quick brown cat jumps over the lazy dog.
The quick brown cat jumps over the lazy dog.
cates are fast.
Replacement syntax cheatsheet
$& — the whole match
$1, $2, ... — capture group N
$` — text before the match
$' — text after the match
$$ — literal dollar sign
\n \t — newline / tab (in replacement)

도구 소개

Find and replace text in one paste — with literal matching or full JavaScript regex, case-sensitivity and whole-word toggles, multiline / dot-all / Unicode-aware flags, and capture-group references (`$1`, `$&`, `$\``) in the replacement. Watch the live match count update as you type so you know exactly what will change before you copy.

도구 개요

Most online find-and-replace tools either don't support regex or hide capture groups behind a paywall. This one runs entirely in your browser, supports every flag the underlying JavaScript engine offers, and gracefully reports invalid patterns instead of silently doing nothing. Pair it with the existing Regex Tester for crafting a pattern, then bring it here to apply the replacement at scale.

사용 사례

  • Bulk-rename variables or imports across a pasted code block
  • Reformat a list of items with a regex template
  • Strip URL parameters across many lines at once
  • Replace placeholder values in an email template
  • Convert date formats with capture groups (e.g., 2024-01-15 → 15/01/2024)

입력/출력 예시

Whole-word match leaves 'Foxes' (different word) untouched.
입력 의도
The quick brown fox jumps over the lazy fox.
Foxes are fast.
Find: fox · Replace: cat · Whole word: on
출력 의도
The quick brown cat jumps over the lazy cat.
Foxes are fast.

자주 묻는 질문

What regex flavor is this?+
JavaScript regex. Everything supported by V8 / SpiderMonkey works — lookbehind, named groups, Unicode property escapes, etc.
Can I reference capture groups in the replacement?+
Yes. $1 through $9 are capture groups, $& is the whole match, $` is text before, $' is text after, and $$ is a literal dollar sign.
Why is 'Whole word' disabled in regex mode?+
In regex mode you can add `\b...\b` yourself for precise control. The whole-word checkbox is a convenience for literal mode.
Will it stop on infinite-loop regex patterns?+
Yes — the engine guards against zero-width matches so a pattern that matches the empty string doesn't lock the page.

다른 도구 보기

아래의 Text 카테고리에서 관련 유틸리티를 찾아보세요.

전체 Text 보기

관련 도구

유용할 수 있는 엄선된 유틸리티