Techalicious Academy / 2026-01-15-regex-therapy

(Visit our meetup for more great tutorials)

REGEX THERAPY - OVERVIEW

Why Regex Matters

Regular expressions look like gibberish. That's the first thing everyone thinks. They see something like this:

^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$

And their brain says "nope."

Here's the secret: you don't need to write monsters like that. Most real-world regex is simple. Five or six characters that save you hours of tedious work. Once you learn the basics, you'll wonder how you ever lived without them.

What We're Actually Doing

This tutorial teaches you regex through three practical tools:

  1. ack - Search files for patterns (like grep, but better)
  2. rename - Bulk rename files with patterns
  3. perl - One-liner text transformations

All three use the same regex syntax. Perl-compatible regular expressions (PCRE). Learn it once, use it everywhere.

+-----------+       +-----------+       +-----------+
|           |       |           |       |           |
|    ack    |       |  rename   |       |   perl    |
|           |       |           |       |           |
+-----+-----+       +-----+-----+       +-----+-----+
      |                   |                   |
      |                   |                   |
      +--------+----------+----------+--------+
               |                     |
               v                     v
          Same Regex            Same Regex
            Syntax                Syntax

The AI Connection

If you're running local AI, you're generating a lot of output that needs processing:

Regex is the glue. It's how you parse AI output, rename generated files, and extract the data you actually need. This is foundation work for everything we do with local AI pipelines.

What You'll Learn

By the end of this tutorial, you'll know how to:

We start simple. Single characters. Then we build up to patterns that would take you forever to do by hand.

What You Need

We'll install the tools as we go.

How This Tutorial is Organized

  1. Overview (you are here)
  2. Installing the Tools
  3. Regex Fundamentals - The Building Blocks
  4. Regex Fundamentals - Combining Patterns
  5. ack - Searching Like a Pro
  6. ack - Advanced Techniques
  7. rename - Bulk File Operations
  8. rename - Pattern Capture Magic
  9. Perl One-Liners - The Basics
  10. Perl One-Liners - Real World Examples
  11. Quick Reference Card
  12. Practice Exercises

Each section builds on the last. Don't skip ahead.