Text

Regex Library

Browse and copy common regex patterns.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type Regex Library and press Return.
  2. No input is needed. Set the options you want.
  3. Adjust the Options on the right if you need to. The defaults are listed below.
  4. Press Get Pattern, or ⌘↵.
  5. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.

Options

OptionValuesDefault
CategoryFilter patterns by categoryAll Categories, Email & Communication, Web & URLs, Data Validation, Dates & Times, Text Patterns, Programming, SecurityAll Categories
PatternSelect a regex patternEmail & Communication: Email Address, Email & Communication: Email (Loose), Email & Communication: Phone (US), Email & Communication: Phone (International), Web & URLs: URL, Web & URLs: Domain Name, Web & URLs: IPv4 Address, Web & URLs: IPv6 Address, Web & URLs: Slug, Data Validation: Credit Card, Data Validation: SSN (US), Data Validation: Zip Code (US), Data Validation: Postal Code (UK), Data Validation: UUID, Data Validation: MAC Address, Dates & Times: Date (YYYY-MM-DD), Dates & Times: Date (MM/DD/YYYY), Dates & Times: Date (DD/MM/YYYY), Dates & Times: Time (24h), Dates & Times: Time (12h), Dates & Times: ISO 8601 DateTime, Text Patterns: Alphanumeric, Text Patterns: Alphabetic, Text Patterns: Numeric, Text Patterns: Whitespace, Text Patterns: Word Boundary, Text Patterns: Sentence, Programming: Variable Name, Programming: Hex Color, Programming: HTML Tag, Programming: HTML Comment, Programming: JSON String, Programming: Semantic Version, Security: Strong Password, Security: MD5 Hash, Security: SHA-256 Hash, Security: JWT Token, Security: Base64Email & Communication: Email Address
Show all matchesDisplay all matches when testing against inputOn or offOn
Case insensitiveApply case-insensitive matchingOn or offOff

Example

Real output from Devly, with the default options.

Input
(none, default options)
Name
Email Address
Pattern
^[\w.+-]+@[\w-]+\.[\w.-]+$
Description
Validates email addresses
Example
user@example.com
---
--- Copy Formats ---
Swift
#"^[\w.+-]+@[\w-]+\.[\w.-]+$"#

From Terminal

With the free command-line tool installed:

Terminal
devly regexlib
# or pipe text in
pbpaste | devly regexlib

Quick Switch also finds it by: regex, regular expression, pattern, library, collection, email, url, phone.

More Text tools