====== dbw_tb - A toolbox for Lua ====== ====== Glob Matching in C++ with `` ====== This library provides a **flexible glob matching** solution in C++ using the `` library. It supports: * **Case-insensitive matching** * **Character classes** (`[a-z]`, `[!0-9]`) * **Recursive globbing** (`**`) * **Extended globbing** (`|`, `()`) * **Brace expansion** (`{a,b}.txt`) ===== Features ===== * **Case-Insensitive Matching**: - The `(?i)` flag is prepended to the regex to enable case-insensitive matching. - Example: `*.txt` matches `file.txt`, `FILE.TXT`, and `File.TxT`. * **Character Classes**: - Supports `[a-z]`, `[A-Z]`, `[0-9]`, `[!0-9]` (negation), and `[abc]` (explicit set). - Example: `[a-z][0-9].txt` matches `a1.txt` but not `1.txt`. * **Recursive Globbing (`**`)**: - `**` is converted to `.*` in regex, allowing it to match any number of subdirectories. - Example: `**/file.txt` matches `file.txt`, `dir/file.txt`, and `dir/subdir/file.txt`. * **Extended Globbing (`|` and `()`)**: - Supports `@(pattern1|pattern2)` for OR logic. - Example: `file@(A|B).txt` matches `fileA.txt` and `fileB.txt`. * **Brace Expansion**: - Supports `{a,b}.txt` to match `a.txt` or `b.txt`. - Example: `{a,b}.txt` matches `a.txt` and `b.txt` but not `ab.txt`.