Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
3 posts found #grep
How to Read a Regular Expression: Literals, Metacharacters, Character Classes, Anchors and Escaping
Developer Tools PART 01

How to Read a Regular Expression: Literals, Metacharacters, Character Classes, Anchors and Escaping

The engine tries the pattern from left to right at every start position in the input and returns the leftmost match, which is why escaping metacharacters, writing class ranges correctly and knowing the anchors matter. We show with real output that in .NET \d accepts Arabic-Indic digits and $ accepts a trailing \n, and validate ISBN-13 and order numbers with .NET, JavaScript and grep.

15 Nov 2026 14 min 10
Regex Flavors: How .NET, JavaScript, PCRE2, POSIX BRE/ERE and RE2 Differ, and Telling Globs from Regex
Developer Tools PART 05

Regex Flavors: How .NET, JavaScript, PCRE2, POSIX BRE/ERE and RE2 Differ, and Telling Globs from Regex

The same pattern works, fails or silently matches something else depending on the flavor: the Perl family (.NET, JavaScript, PCRE2) offers lookaround through backtracking, RE2 and Rust regex give it up for linear time, and POSIX picks the longest match. We run one probe list in five engines, show Prometheus's full-match =~ with promtool, and the difference between globs and regex with .gitignore and PowerShell.

15 Nov 2026 16 min 9
Regex on the Command Line and in the IDE: grep -E/-P, ripgrep, sed, git grep, PowerShell and Repo-Wide Find/Replace
Developer Tools PART 06

Regex on the Command Line and in the IDE: grep -E/-P, ripgrep, sed, git grep, PowerShell and Repo-Wide Find/Replace

The safe order for a repo-wide regex change is: a clean working tree, the file list from git grep, a preview with rg -r, applying with sed -E and checking with git diff. We show the regex differences of grep, ripgrep, PowerShell and the IDEs, a real refactor in Bookstore that turns interpolated log calls into message templates, and why $ does not match in a CRLF file, together with .NET 11's AnyNewLine option.

15 Nov 2026 14 min 8
Blog Map