Regex for Hackers (with Python)

Regex for Hackers (with Python)

🎙 John Hammond 👥 2.2M 📅 October 13, 2025 ⏱ 39 min 👁 24K 📄 tutorial 🧭 2026-08-16
Available in: English (current) Français

Keywords

regular expressionsPythonredactionpattern matchingcybersecurity

Summary

In this tutorial, John Hammond demonstrates how to use regular expressions (regex) in Python to redact sensitive information from text files. He starts by explaining the basics of regex, including special characters like dot, star, plus, and question mark, and the difference between greedy and lazy matching. He then shows how to use Python’s re module to compile patterns and use functions like match, search, and findall. The main project is building a script that reads a file, applies a dictionary of regex patterns to redact dates of birth, phone numbers, emails, and other sensitive data, and outputs the redacted content. He also promotes a paid course on HackingHub for learning regex in a hacking context. The video is practical and hands-on, with clear examples and explanations.

127 words

Critical Evaluation

Value of the Information & Strength of the Argument

The video provides valuable practical knowledge on using regex for redaction, a common task in cybersecurity and data privacy. The argumentation is solid: John explains each concept with examples and demonstrates the code step by step. He also clarifies nuances like the difference between match and search, and greedy vs. lazy matching. The approach is methodical and easy to follow, making it useful for beginners and intermediate users. The main value lies in the real-world application of regex to protect sensitive information, which is highly relevant in cybersecurity and data handling.

Scientific Rigor, Source Quality, Title Accuracy

The scientific rigor is good: the technical content is accurate and aligns with Python’s official documentation, which is referenced. The video is a tutorial, not a research presentation, so it doesn’t cite academic sources, but it does link to relevant resources like the Python re module documentation and a paid course. The title accurately reflects the content. The video includes a promotional segment for a course, but it is clearly marked and does not detract from the technical content. Overall, the sources are appropriate for the tutorial nature of the video.

197 words

Title / Content Match

The title accurately reflects the content: the video focuses on using regex in Python for hacking-related tasks, specifically redaction.

Quality & Reliability

8/10

The video is a practical tutorial on using regex in Python for redaction, with clear explanations and demonstrations. The content is accurate and aligns with official Python documentation. The main limitation is the promotional nature for a paid course, but the technical content is sound.

Key Moments

Cited Sources

Concurring Sources

External References

Contribution & Novelties

The video offers a practical, hands-on approach to using regex for redaction, which is a common but often overlooked task in cybersecurity. It provides a clear, step-by-step tutorial that bridges the gap between theoretical regex knowledge and real-world application. The script built in the video is a useful starting point for automating data sanitization.

Pour aller plus loin :

94 words

Radar Profile

The radar profile shows high scores in quality and reliability, with moderate scores in quantity and technical depth. This indicates a well-executed tutorial that is accurate and useful, but not extremely dense or comprehensive.

Reliability 8/10