Regex for macOS: Mac Regex Tester
Mac Regex Tester and Editor
For macOS 14.2 and later.
Regex for macOS is active again. It is a focused Mac regex tester and regular expression editor for building, testing, and copying regexes before you paste them into code, Terminal, or another app.
Version 2.4.0 refreshes the editor layout and match highlighting so regular expressions are easier to read while you test them. It is built for the work I usually want before moving a pattern into Swift, grep, sed, nginx, an editor, or another tool: paste real text, inspect the matches, check the capture groups, then copy the expression.

Testimonials
Fast, simple and to the point
★★★★★
This app is awesome and easy to use. It not only does its job well, but helps me learn about regular expressions.
Like the new, clean look of the app
★★★★★
I like the new, clean look of the app. It’s a vast improvement over the previous UI. Also fixes many of the issues I had with it.
Generate a regex quickly
★★★★
The app works fine and I can generate a regex quickly.
Features
- Edit, test, and build regular expressions on macOS
- Refreshed editor layout in version 2.4.0
- Easier-to-read match highlighting as you modify the regular expression or sample text
- Escapes backslashes and quotes when copying a regular expression
-
Unescapes backslashes and quotes when pasting a regular expression
- Supports capture groups
- Supports matching options such as case-insensitive, dot-all, and multiline matches
- Supports positive lookahead, negative lookahead
- Supports positive lookbehind, negative lookbehind
- Supports backreferences
- Fast and simple to use
When to use it
Use Regex for macOS when you want to test a regular expression against sample text, inspect capture groups, or check lookahead and lookbehind matches before using the pattern elsewhere.
I use it as a local scratchpad for real text that I do not want to paste into another browser tab. The release build is sandboxed and the current app has no network entitlement, account system, analytics SDK, in-app purchase flow, or web upload.
If you are taking a pattern to Terminal, start in the app, then copy it into grep -E on macOS. The Regex for macOS Tutorial walks through the same workflow with examples.
Details to check before pasting a regex elsewhere
Regex for macOS currently matches patterns with Swift’s Regex engine. That is useful if the final destination is Swift, but it does not mean every pattern will behave the same in every tool. I still check the destination when the pattern is going into:
- Swift code, especially if I am deciding between a plain regex,
NSRegularExpression, andRegexBuilder - macOS
sed -E, where replacement syntax and shell quoting matter - nginx rules, where location matching and rewrite captures have their own rules
The app helps with the first pass: sample text, matches, capture groups, matching options, and escaped copying. It is not a multi-engine compatibility tester, so I still run the final command or code path before using a regex on important data.
FAQ
How is this different from regex101 or RegExr?
Those browser tools are useful, especially when you need a specific web-based engine reference. Regex for macOS is the native Mac scratchpad I use when I want a focused app next to my editor or Terminal, with sample text and copy/paste escaping handled locally.
Does it replace testing in Swift, sed, nginx, or production code?
No. It helps me build and inspect the pattern before I move it. I still test the final destination because regex engines, string escaping, shell quoting, and replacement syntax can differ.
Does it support capture groups?
Yes. You can switch the visible capture group and inspect matches while editing the pattern and sample text.
Can I use it as a macOS grep regex tester?
Yes, for the first pass. I usually build the pattern in Regex for macOS, then paste it into grep -E and check the final command in Terminal. The Regex for macOS Tutorial has the grep examples I use for that workflow.
