- lua_fs ^ lua_scripting ^ ->
====== dbw_tb - A toolbox for Lua ======
This is a custom library of tools designed to work with vai.
local tb = require("dbw_tb")
Currently there's only one function to match a string to a pattern using advanced globbing:
glob_match (string, pattern, caseInsensitive)
The pattern can be the following:
==== Glob Matching in C++ with `` ====
This library provides a **flexible glob matching** solution in C++ using the `` library. It supports:
* **Character classes** (`[a-z]`, `[!0-9]`)
* **Recursive globbing** (`**`)
* **Extended globbing** (`|`, `()`)
* **Brace expansion** (`{a,b}.txt`)
===== Features =====
* **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`.