DevTools
Language

Regex Generator

DevTools Regex Generator provides preset JavaScript patterns for Email, URL, IPv4/IPv6, UUID, MAC, dates, and times with notes, samples, and local testing—free with no sign-up.

Regex Generator

Pick common types (Email, URL, IPv4/IPv6, UUID, MAC, dates, times) and get a JavaScript regex with notes and sample matches.

Pattern type
Regular expression
/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/

Matches common email addresses: local part allows letters, digits, and ._%+-; domain has at least one dot and a 2+ letter TLD. Does not verify deliverability.

Example matches
  • user@example.com
  • name.surname+tag@mail.co.uk

2 matches

  • "support@devtools.example.com" @ 8
  • "admin@company.org" @ 57

About this tool

Form validation, log parsing, and data cleaning often need standard patterns. Pick a type, copy /pattern/flags, and test against sample text on the page.

How to use

  1. Select a pattern type (e.g. Email, UUID).
  2. Copy the generated /pattern/flags into your code.
  3. Paste sample text in the test area and adjust flags if needed.

FAQ

How do I get a regex for common formats online?

Choose Email, URL, IPv4, or other types on the Regex Generator page. You get JavaScript regex, notes, and examples with one-click copy.

Which regex engine is used?

Output is JavaScript RegExp syntax—same as browsers and Node.js. PCRE-only features (e.g. (?R)) are not included.

Do presets cover every edge case?

Presets target common validation. Internationalized email or URLs with unusual ports may need tweaks—validate with real data or the Regex Debugger.

Is my text uploaded?

No. Pattern generation and testing run locally in your browser.

Related tools