← Tools Portfolio Regex Tester

Regex Tester

Match · Replace · Groups — live, lokal di browser.

Flags
/ / g
Panduan Tombol
Matchtampilkan match dengan highlight warna
Replaceganti match dengan string pengganti
Gglobal — cari semua match, bukan hanya pertama
Icase-insensitive — abaikan huruf besar/kecil
Mmultiline — ^ dan $ cocok per baris
SdotAll — . ikut cocok dengan newline
Uunicode — aktifkan mode Unicode penuh
Copy Matchessalin semua teks match ke clipboard
Clearkosongkan pattern, test string, dan replace
? Reftampilkan / sembunyikan panel referensi ini
Metacharacter
.sembarang char (kecuali newline)
\ddigit [0-9]
\Dnon-digit
\wword char [a-zA-Z0-9_]
\Wnon-word char
\swhitespace
\Snon-whitespace
\nnewline
\ttab
\\backslash literal
Quantifier
*0 atau lebih (greedy)
+1 atau lebih (greedy)
?0 atau 1
{n}tepat n kali
{n,}n kali atau lebih
{n,m}n sampai m kali
*?lazy — sesedikit mungkin
+?lazy 1+
??lazy 0 atau 1
Anchor & Class
^awal string (atau baris jika flag m)
$akhir string (atau baris jika flag m)
\bword boundary
\Bbukan word boundary
[abc]a, b, atau c
[^abc]bukan a, b, atau c
[a-z]range a hingga z
a|ba atau b
Group & Referensi
(...)capture group
(?:...)non-capturing group
(?<n>...)named capture group
\1back-reference ke group 1
\k<n>back-reference named group
Lookaround
(?=...)positive lookahead
(?!...)negative lookahead
(?<=...)positive lookbehind
(?<!...)negative lookbehind
Replace & Flag
$1capture group ke-1
$<n>named group
$&seluruh match
$`teks sebelum match
$'teks setelah match
$$literal $
gglobal — semua match
icase-insensitive
mmultiline ^$ per baris
sdotAll — . cocok newline
uunicode mode
Test String 0 karakter
Match Preview
Tulis pattern dan test string...
Detail