./prontouso.com
ALAT DEVELOPER

Penguji Regular Expression (Regex)

Tulis pola regular expression, aktifkan flag (g, i, m, s, u), sorot kecocokan secara real-time, dan periksa grup penangkapan (capturing groups) dengan penjelasan.

Status alatBerjalan di browser Anda
Pratinjau

Input

Hasil

Matches
2
Status
OK
  • hello@example.comIndex 8 · 0 capture group(s)
  • support@example.orgIndex 29 · 0 capture group(s)

Matches update as you edit the pattern, flags, or text.

Cara kerja

  1. Masukkan data Anda

    Isi nilai yang diperlukan, tempel teks Anda, atau unggah file yang ingin diproses.

  2. Lihat hasil seketika

    Sebagian besar alat diperbarui secara langsung saat Anda mengetik; beberapa menggunakan satu tombol tindakan.

  3. Gunakan hasil Anda

    Salin, unduh, atau bagikan hasil yang dihasilkan — Anda selalu memiliki kendali penuh atas data Anda.

Privasi dan pemrosesan dataBerjalan secara lokal di browser Anda. Alat ini tidak mengunggah data Anda.

Apa itu Penguji Regular Expression (Regex)?

Test a JavaScript regular expression against real text, inspect matches and capture groups, and preview replacement output.

PAHAMI CARA KERJA ALAT

How to test a regular expression

How to use it

  • Enter the regex pattern without surrounding slashes.
  • Add flags such as g, i, or m when needed.
  • Paste the text you want to test.
  • Review the match count, match positions, capture groups, and replacement preview.

Useful checks

Regex testers are useful for validating form patterns, cleaning log data, preparing search-and-replace rules, and debugging capture groups before they go into code.

Debugging tips

  • Start with a small sample before testing a long document.
  • Add the g flag when you want all matches.
  • Use capture groups to confirm which part of the match you will reuse.

RegExp notes

The tester uses JavaScript RegExp behavior. Patterns written for PCRE, .NET, Java, or database engines may need adjustment before they match the same way.

Pertanyaan yang Sering Diajukan (FAQ)

Which regex flavor does this use?

It uses JavaScript regular expressions, the same flavor used by modern browsers.

Why does a valid regex from another language fail?

Regex syntax differs between engines. A pattern from PCRE, Python, or Java may need small changes for JavaScript.

Does it limit matches?

Yes. The preview stops after 200 matches so a runaway pattern does not overwhelm the page.

Why are matches capped?

The tester lists up to 200 matches so an accidental broad pattern does not freeze the page.