regex

Regular expression support and pattern syntax in Groovy.

Python Project: Build a Log Parser CLI (Regex + argparse)

This Python log parser project takes five separate skills you have met one at a time, regular expressions, dataclasses, the Counter, datetime, and argparse, and welds them into a single command line tool you would actually reach for at work. Server logs are where a lot of real debugging starts, and by the end of this post you will have a tool that reads a ten thousand line access log and answers real questions about it in under a second. ... Read More

Python: Regular Expressions, Patterns, Groups, Lookaheads

This is the complete Python regex reference: every pattern syntax, character class, quantifier, group type, lookaround, and re module method for regular expressions in Python, each with a tested example. It is the cheat sheet you bookmark and keep coming back to. “Some people, when confronted with a problem, think ‘I know, I’ll use regular expressions.’ Now they have two problems.” Jamie Zawinski Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Intermediate | Reading Time: 13 minutes ... Read More

Python: Regex in Practice (Validation, Parsing, Text Processing)

These python regex examples put regular expressions to work on real jobs: validate emails, phone numbers, and passwords, parse log files and CSV (comma-separated values) data, pull clean information out of messy text, and wire it all into a small text processing pipeline. Every pattern here is tested and ready to paste into your own code. “Some people, when faced with a problem, think: I know, I will use regular expressions. Now they have two problems. Use the right tool, ... Read More