DEV Community

Dinesh Rajendran
Dinesh Rajendran

Posted on • Originally published at l2cache.amvo.store

Why Your Mac Clipboard Needs 'grep': Regex Pattern Matching for Code & Tokens

If you spend enough time in the terminal, you know that grep is a superpower. Need to find an error in a 10,000-line log? grep. Need to isolate a specific IP address? grep.

But what happens when that data leaves the terminal?

As developers, we copy dozens of highly specific strings every single hour:

  • UUIDs from database logs
  • Bearer tokens from API responses
  • AWS ARNs and resource identifiers
  • Hex color codes and environment variables

The default macOS clipboard holds exactly one item. If you copy a UUID and then accidentally copy a Slack message right after, that UUID is gone.

Even if you use a standard clipboard manager (like Maccy or Paste) that saves your history, you run into a major limitation: Searchability.

Standard clipboard managers rely on basic substring search. If you know you copied a UUID three hours ago, but you don't remember what the actual random string was, how do you search for it?

You can't.


Bringing Regex & grep to the Clipboard

This exact frustration is why I built L2Cache — a native macOS developer tool and smart clipboard memory layer. I wanted to bring the power of grep and a full regex matcher directly to my clipboard history.

Instead of typing a vague word and hoping the right token appears, you can search your clipboard history using raw regular expressions:

  • Find that UUID from this morning: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-...
  • Find an IPv4 address: \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
  • Find bearer tokens / JWTs: eyJ[A-Za-z0-9-_]+\.eyJ[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+

L2Cache uses a local SQLite database with FTS5 (Full-Text Search), meaning querying a history of 10,000+ clips with complex Regex takes milliseconds.


Built-in Smart Shortcuts

Because nobody wants to write regex for an IPv6 address or a JWT token from memory while coding, L2Cache includes built-in Smart Shortcuts.

By typing / in the search bar, you instantly get quick shortcuts for common developer patterns:

  • /uuid
  • /jwt
  • /ip
  • /email
  • /hex (Color codes)
  • /url

It transforms your clipboard from a dumb scratchpad into a queryable, grep-like database of your daily engineering workflow.

Stop losing your API keys and tokens in the abyss of your clipboard history.

L2Cache Regex Pattern matcher in action


L2Cache is 100% on-device and currently free on the Mac App Store for early access.

Top comments (0)