Trusted by 340+ developers

Regex Generator

Generate Regex from plain English for free. Uses ChatGPT API. Enter a description of the Regex pattern you want to generate and click on the Generate Regex button. You will get back the expression, test cases and code snippets for the language of your choice.

Generate a regex pattern to match...

Regex Pattern for words that start with hello and end with d

^hello\w*d$

Find it useful? Share with your friends →

Recently generated

What is Regex?

Regex (short for Regular Expression) is a syntax for matching patterns in text. It's the most common way to search for something in a file or string, and it can be used in many different ways.

For example, if you have a list of email addresses like below:

  1. hotdoglover69@hotmail.com
  2. cheesewizmaster@gmail.com
  3. burritobandit@hotmail.com
  4. mymommademedothis@gmail.com
  5. dancingbanana@yahoo.com

and you only want the ones that end with gmail.com, you could use this regex: .*@gmail.com$ to filter them out. This is how it breaks down:

  1. . at the starts means match any character
  2. @gmail.com means the next characters should be @gmail.com
  3. $ means it should be the ending sequence

This was an easy one. Regex can be used to define ANY kind of a pattern:

  1. words that start with a letter
  2. words that have repeated sequence three times
  3. a 10 digit phone number with hyphens in the middle

Using the Regex generator

Regex generator is an online tool that uses AI to generate a regex string from an english description. Just describe what kind of strings you are trying to match and hit go! We also generate 10 test cases, 5 that should pass for the expression and 5 that shouldn't. This way you can quickly determine if the expression is as robust as you would for your use case. We also generate code snippets for your favorite programming languages - JS and Python that can be used right away.