Regex generator

Get a ready regular expression for emails, URLs, phones, dates and more.

  • Development
  • 100% free & unlimited
  • No sign-up
  • Runs in your browser
Regex generator

What is the regex generator?

The regex generator gives you a ready, tested regular expression for the most common patterns – email addresses, URLs, domains, IPv4 and IPv6, Indian mobile numbers, PIN codes, PAN, GSTIN, Aadhaar and IFSC codes, dates, times, colors, UUIDs and more – in JavaScript, PHP and Python syntax.

Choose whether to validate a whole value or to find matches inside a text, and paste test values to see what matches.

How to use the regex generator

  1. 1Pick what to match.
  2. 2Choose validate or find.
  3. 3Test it with your values and copy the regex.

Features

25+ patterns

Including Indian formats: PAN, GSTIN, Aadhaar, IFSC and PIN code.

Three languages

JavaScript, PHP and Python syntax.

Validate or find

Anchored ^…$ or with word boundaries.

Live test

See which values match.

Frequently asked questions

Can a regex fully validate an email?

Not completely: the pattern catches typos, but only sending an email proves the address exists.

What do ^ and $ mean?

The start and the end of the value, so the whole value must match.

How do I test my own regex?

Use the regex tester to see every match and group.