Recently, while writing technical documentation, I needed to count words. I tried several online tools and found inconsistent handling of Chinese a…
Posts for: #Tutorial
Building a Text Replace Tool: Regex and String Processing
Recently, I needed to implement a batch replace feature supporting both plain text and regex modes. Seemed simple, but I ran into some interesting …
Text Diff Tool: From Line-by-Line Comparison to Smart Matching Algorithms
In code reviews, configuration file comparisons, and document version management, Text Diff is one of the most essential tools. Today we’ll div…
Text Deduplication Algorithms: From Set to Efficient Implementation
Duplicate data is everywhere. Log analysis, user list cleaning, keyword extraction… the scenarios are endless. Let’s dive into several deduplicat…
Building a Tailwind CSS Class Name Generator: From String Concatenation to Visual Builder
What’s the most painful part of writing Tailwind CSS? It’s not memorizing class names—it’s debugging a long string like `flex justify-center items-…
Table Generator Implementation: From Data Editing to Multi-Format Output
When writing technical documentation, I often need to insert tables. Hand-writing Markdown tables is manageable, but converting to HTML or CSV is t…
From Manual to Automated: Systemd Service Unit Configuration Best Practices
Last week, while deploying a Node.js application to production, I hit another systemd pitfall. The service kept exiting silently with no error logs…
SVG Optimizer Implementation: From Regex to Performance
Working on an icon library project, I noticed exported SVG files were often 50KB+. After optimization, they shrank by 60%. But manually uploading a…
String Escape Implementation: From Regex Replacement to Unicode Handling
Dealing with user input strings often causes problems when special characters break JSON parsing. Newlines, quotes, backslashes - they all need pro…
SQL Formatter: From Regex to AST Parser Implementation
Recently during a code review, I came across a SQL statement compressed into a single line - hundreds of characters strung together, making it pain…