πŸ”
πŸ“‹

Test Regex for Form Validation

Write and test regular expressions for validating emails, phone numbers, postcodes, and other form inputs.

Tidak perlu login
//g
Flags:
Examples:

Test text

Matches

The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.Enter a pattern above to see matches highlighted here.

Form Validation tips

πŸ“‹

Test your validation pattern against both valid and invalid inputs before adding it to your code. Edge cases are easy to miss.

πŸ“§

Email validation regex is surprisingly complex. A practical pattern: ^[^\s@]+@[^\s@]+\.[^\s@]+$ β€” simpler patterns catch most real addresses.

πŸ“±

Phone number formats vary by country. Consider whether to validate format or just digits β€” stricter validation can frustrate international users.

πŸ’‘

Use named capture groups (?<year>\d{4}) to extract parts of matched strings in your validation code.

Cara kerja

1
Masukkan
Enter your data into the tool above. Everything stays local to your browser.
2
Proses
The tool processes your data instantly in your browser using JavaScript. No server, no waiting.
3
Unduh
Get your result instantly. Nothing is stored after you leave the page β€” complete privacy.

Mengapa milik kami?

βœ“Sepenuhnya gratis β€” tidak ada biaya tersembunyi, selamanya
βœ“Tidak perlu akun, email, atau login
βœ“File tidak pernah meninggalkan perangkat Anda
βœ“Tidak ada batasan ukuran file sama sekali
βœ“Tidak ada tanda air pada output apa pun

Also check out…

Pertanyaan yang sering diajukan