Simulation Problems: Network String Processing in C++
Overveiw
This article discusses several classic simulation problems that involve network string processing. Each problem requires parsing structured text, handling patterns, and implementing matching or replacement logic. The solution are written in C++ using standard libraries.
Template Generation System
The first problem involves a template e ...
Posted on Mon, 18 May 2026 22:27:11 +0000 by BobLennon
Advanced Shell Variable Operations
Variable Deletion and Replacement
Removing Prefix Patterns
Removing the shortest matching prefix pattern using #:
greeting="Hello World, Welcome to Shell"
echo $greeting
greeting_clean=${greeting#*or}
echo $greeting_clean
Removing the longest matching prefix pattern using ##:
greeting_long=${greeting##*or}
echo $greeting_long
String ...
Posted on Fri, 08 May 2026 14:00:10 +0000 by netpants