Text

Regex Tester

Test and debug regular expressions with match highlighting.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type Regex Tester and press Return.
  2. Paste or type your text into Input.
  3. Adjust the Options on the right if you need to. The defaults are listed below.
  4. Press Test, or ⌘↵.
  5. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.
What to enter
Enter pattern on first line, then test string(s)...

Example:
\d+
There are 42 apples and 7 oranges

Options

OptionValuesDefault
Case insensitive (i)Ignore case when matchingOn or offOff
Multiline (m)^ and $ match line start/endOn or offOff
Dot matches newlines (s). matches newline charactersOn or offOff
Show capture groupsDisplay captured groupsOn or offOn
Replacement stringUse $1, $2, etc. for groupsText (e.g. Empty = match only)—

Example

Real output from Devly, with the default options.

Input
[\w.]+@[\w.]+\.\w+
Contact hello@devly.app or support@example.com for help.
Matches found
2
Pattern
[\w.]+@[\w.]+\.\w+
Match 1
"hello@devly.app" at 8-23
Match 2
"support@example.com" at 27-46
Highlighted
Contact 【hello@devly.app】 or 【support@example.com】 for help.

From Terminal

With the free command-line tool installed:

Terminal
devly regex --path input.txt
# or pipe text in
pbpaste | devly regex

Quick Switch also finds it by: regex, regular, expression, pattern, match, search, replace.

More Text tools