RegExp Tester

Test your regular expressions without online tools. 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...

DevUtils.app: RegExp Tester macOS app

Quickly test a regular expression

You can test a regular expression from anywhere in your macOS (terminal, in email, web browser,...). Activate the app by:

  • Copy text → Press Space
    (Or your own customized hotkey, up to you)
  • Copy text → Click to iconDevUtils.app status bar icon in the status bar
  • Select text → Right-click → "Inspect in DevUtils.app"
    (This menu appears after you install the app)

Input

Enter your regular expression in the input textbox and the sample text in the second textbox. The matches will be highlighted as you type.

You can also load the sample text from a file from your computer using the "Load file..." button.

Output

The tool will render the matches with green background. You can also inspect each matches using the text view at the bottom. The text view lists all the matches separated by a new line.

You can navigate to each matches by clicking the "back" and "forward" button. The label in between displays the number of matches for the current regex.

RegExp Output Expression

You can specify either a simple delimiter (ex. , or \n), or use substitution tokens to generate more advanced reports. For example, $1\n would list all group 1 results

TokenDescription
$0 or $&Matched string (group 0)
$1, $2, $3, etc.Capture group 1, 2, 3, etc.
(Only group 1 - 9 are supported)
$\<foo>, $\<bar>, etc.Named capture group "foo", "bar", etc.
(Require macOS 10.13+)
\nNew line character
\tTab character

Group Matching

You can view the matched groups in a nicely rendered tree view.

DevUtils RegExp Group Matching

Options

Currently, the supported regex engines are:

  • ICU Engine

Supported flags:

  • Case insensitive
  • Allow use of white space and #comments within patterns
  • "." matches line separators
  • "^" and "$" matches at the start and end of each line within the input text
  • "\b" matches words based on boundaries defined in Unicode UAX 29, Text Boundaries

You can click to the gear icon to set the flags.

DevUtils.app: RegExp Tester Settings macOS app


Also available on regextester.app