Regex Generator

Creating regular expressions is easy again!

1

Paste a text sample.
Give us an example of the text you want to match using your regex. We will provide you with some ideas how to build a regular expression.

2

Which parts of the text are interesting for you?
Click on the marked suggestions to select them for your regular expression.

3

Regular expression
Hover the generated regular expression to see more information.
When this option is checked, the generated regular expression will only contain the patterns that you selected in step 2. Otherwise, all characters between the patterns will be copied.
Would you like the generated regular expression to match all of the input?

4

Usage in programming languages
By default, all major regex engines match in case-sensitive mode. If you want patterns such as Name: [a-z]+ to match in case-insensitive fashion, we need to turn that feature on.  *
By default, the dot . doesn't match line break characters such as line feeds and carriage returns. If you want patterns such as BEGIN .*? END to match across lines, we need to turn that feature on. *
By default, most major engines (except Ruby), the anchors ^ and $ only match (respectively) at the beginning and the end of the string. In other engines, if you want patterns such as ^Define and >>>$ to match (respectively) at the beginning and the end of each line, we need to turn that feature on. *
Share

To share the current page content and settings, use the following link: