Top 18 Free Regex Editors, Testers and Builders for Linux, Windows and macOS
What is a Regular Expression?
A regular expression (also known as a pattern or expression) is a sequence of symbols or characters that is used to define or search for patterns in text, such as strings, numbers, or dates. They are useful for filtering, sorting, and searching large datasets, as well as automating repetitive tasks in computer programming.
Regular expressions are characterized by their syntax, which consists of alternation groups (e.g., ?
, *
, +
) and parentheses. These groups help define the constraints of the pattern, allowing for more precise matching. The syntax is based on the backslash escape character, which represents a literal backslash
Examples and Use-cases of Regular Experssions
Here are some examples of regular expressions:
^searchPattern$
- Matches strings that start with the specified pattern and end with the same pattern.^\d{4}-\d{2}-\d{2}$
- Matches dates or time strings that start with a four-digit number (e.g., "000-00-00") and end with a two-digit number (e.g., "2000-00-00").^searchPattern$
- Matches strings that start with the specified pattern and end with the specified pattern.(?:searchPattern1|searchPattern2).*?searchPattern3
- Matches a sequence of strings that contain the specified pattern at least once, separated by a newline or a space.(?:searchPattern1|searchPattern2).*?searchPattern3
- Matches a sequence of strings that contain the specified pattern at least once, separated by a newline or a space.
What is used for?
Regular expressions are widely used in various applications, including web development (to validate user input and form validation), data extraction, natural language processing, and automation tasks. They provide a powerful and flexible tool for handling text data and automating repetitive tasks.
There are several tools, builders, testers, and editors that can help you work with regex.
1. Regex-Vis
Regex-Vis is a free and open-source regular expression editor and visualizer that aids developers in visualizing, editing and testing regular expressions with ease.
It is written using TypeScript, React.js, and can be easily deployed as a self-hosted app using Docker.
2. Nodexr
Nodexr is a graphical node-based Regular Expression editor, created in C# and Blazor. It is written in C# for Windows systems.
Features
- Uses the full .NET Regex engine for search and replace (unlike most online Regex tools).
- Show the results of search and replace (using the .NET Regex engine) in the browser in real time.
- Full syntax highlighting.
- Hover over sections of the output to see which node they were generated by.
- The nodes can be used to work with (almost) all of the .NET Regex spec, and any additional functionality can be implemented either by using the Text node without escaping, or with a custom Group node.
- The node-based approach makes it almost impossible to have syntax errors, missing parentheses etc (except with certain nodes)
- Enter an existing Regex and it will be parsed into a fully editable node tree (using the Edit button next to the output). This should work with expressions of any complexity level (although there are a couple of niche features that can't yet be parsed properly).
- Create a shareable link for your expression, to send to someone else or come back to later (this feature currently relies on the expression parsing, so in some cases the node tree will be a little different after sharing - but the expression should be the same).
- Information about each node can be found by clicking the (i) button next to its title.
- Automatically deals with non-capturing groups, so you no longer have to think about them in 99% of cases.
- Runs completely client-side - no communication with a server after the initial page load.
3. RegexMate (macOS)
RegexMate is a regular expression application available for macOS and iOS. It features a clean user interface and powerful functionalities, enabling users to easily create, test, and utilize regular expressions.
Features
4. RegEx Tester
This is a web-based open-source app that enables developers to test their regular expressions patterns in not time. You can use its online demo version here.
5. RegexAssistant
RegexAssistant is an open source Regular Expression (Regex) find and replace tool for Windows. It has an easy to use UI that can build and test regex, and the results are seen in real time as expressions are typed into the GUI.
It has a cheat-sheet token window which list the main regex tokens and common patterns. Items in the token list can be inserted into the Expression (regex) field by double clicking the desired token.
The app is written using C++ and released under the GPL-3.0 License.
Features
- Developer-friendly interface
- Real-time results
- Compatibility Option
- Cheat-sheet (Token List)
- Cheat-sheet Common Patterns: Phone, IP, Time, Date, URL, Credit Card, File Name, GUID, File, Social Security Number, Error, and Zip code patterns
- Convert file system patterns
- Convert SQL
6. Regex Tester
This is an open-source simple app for testing regular expressions. It shows all matches of search pattern in a string.
It is written primary using Vala for Elementary OS Linux distro, but can be easily installed on any Linux distro with Flatpak support from Flathub.
7. pythex
This web-based tool is written using Flask the Python web framework and jQuery, to allow developers test their regular expression strings easily.
8. Dev Toolbox
Dev Toolbox is a free and open-source Linux app that eases developers workflow by providing a set of useful features for the common development tasks.
9. TS Regex Builder (Library)
This tool allows you to build maintainable regular expressions for TypeScript and JavaScript.
10. NSRegexTester (macOS)
This is a very simple macOS application that allows you to test regular expressions against sample text. It is based on the Mac OS SDK's implementation of NSRegularExpression, which is based on ICU.
11. RegExp Tester
DevUtils.app allows you to quickly test regular expressions with a sample text without any internet connection.
It supports ICU regex engine and flags: case sensitive, white space, comments, line separator options...
12. RegEx+ (macOS)
A Free native RegEx test tool written for macOS using Swift.
Features
- macOS app and iOS app in one codebase
- Regular Expression syntax highlight
- Sync data automatically with CloudKit
- Regular Expression Cheat Sheet
- Internationalization
- English
- Simplified Chinese
- Traditional Chinese
13. Regular Expressions 101 (Desktop Edition)
A cross platform (macOS, Linux & Windows) unofficial "offline" version of the regex101.com website. Uses the users own database (any qt supported backend - sqlite, mysql, postgresql etc) to store expressions.
14. grex (CLI)
grex is a library as well as a command-line utility that is meant to simplify the often complicated and tedious task of creating regular expressions. It does so by automatically generating a single regular expression from user-provided test cases. The resulting expression is guaranteed to match the test cases which it was generated from.
This project has started as a Rust port of the JavaScript tool regexgen written by Devon Govett. Although a lot of further useful features could be added to it, its development was apparently ceased several years ago.
The next plan is to add new features to grex as Rust really shines when it comes to command-line tools. grex offers all features that regexgen provides, and more.
15. Swift Regex
This is a Regular Expression Tester with highlighting for Swift Regex. Quickly test and debug your regex and Regex Builder. It is written using Swift and can run as a web app.
16. RegExpress (Windows)
This is an amazing RegEx tester tool written in C++ and C# for Windows systems.
17. Retest
Retest is a regular expression tester that can be used in the terminal. It is meant to be a simple and quick utility to aid you in developing regular expressions.
Features
- Piping! You can pipe a subject string to match against into standard input.
- Nested highlighting! If the regular expression contains groups and subgroups, they will be highlighted in different colors than the whole match.
- All matches! Retest finds all non-crossing matches in the subject string.
- List of matches! You can optionally display all matches as a formatted list, which includes the match order and the indexes in the string.
18. Wildcard (Linux)
Wildcard is a Linux native app that gives developers a nice and simple to use interface to test/practice regular expressions.