Saved Regex Library

Persist regex patterns with test strings and tags.

Open tool

Overview

A personal library for your most-used regular expressions. Save a pattern along with a test string, description, and tags; recall it later in the regex tester without retyping. Everything is stored in your browser, so your patterns travel with you across sessions.

Developers who maintain a stable of patterns for log parsing, CSV cleanup, input validation, or data extraction need somewhere reliable to keep them. Sticky notes and scratch text files get lost; a dedicated library survives across reboots and lets you tag patterns by project or domain.

How it works

Each entry stores the regex pattern, the active flags (i, g, m, s, u), a representative test string that demonstrates the intended matches, an optional description, and tags for filtering. The library lives in browser local storage as JSON, so it persists across tabs and reloads but stays private to your device. Search and tag filters help you find a pattern quickly even after the library grows large.

Examples

Name:        Match US phone numbers
Pattern:     \b\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}\b
Flags:       gi
Test string: Call (555) 123-4567 or 555.987.6543
Tags:        phone, validation, us
Name:        Extract email addresses
Pattern:     [\w.+-]+@[\w-]+\.[\w.-]+
Flags:       g
Test string: alice@example.com, bob+filter@test.org
Tags:        email, scraping

FAQ

Where is my library stored?

In your browser's local storage. Nothing is uploaded to any server. Export the library as JSON to back it up or move it between machines.

Can I share a pattern with a teammate?

Use the export option to copy a pattern (or the whole library) as JSON and paste it into a shared doc. Or import the JSON into another browser's library.

Does it support patterns from regex flavours other than JavaScript?

You can store any pattern you like, but the test runner uses the browser's JavaScript regex engine. PCRE-only features (recursion, possessive quantifiers in some forms) may not run against the test string here.

Try Saved Regex Library

An unhandled error has occurred. Reload ×