Home/Modules/regex

regex

system module regex

Examples

lib/examples/regex

6 file(s)

<img align="right" src="https://github.com/mearvk/SLeeLa/blob/master/images/debian/debian-logo.png" width="75" height="75" alt="SLeeLa">

<img src="https://github.com/mearvk/SLeeLa/blob/master/images/sleela/sleela-logo-004.jpg" alt="SLeeLa">

SLeeLa Regex

Version: 1.2.0-dev

Cross-platform regular-expression subsystem for SLeeLa. The subsystem has three layers: the SLeeLa language library, the Natural Form front-end, and native/backend adapters for C, C++, and Java.

Current Library Inventory

The SLeeLa-facing regex library currently contains 27 separate .sleela objects under lib/regex/. This includes the core regex objects, matching/search objects, replacement and splitting objects, capability/configuration objects, diagnostics, and the complete Natural Form family.

See ../lib/regex/REGEX.INDEX.md for the authoritative object inventory.

Natural Form

Natural Form is the SLeeLa-level, user-facing regex contract. Its language definition is intentionally finite and versioned independently at 1.1.0-dev. Readable names and compact symbolic aliases are equivalent where defined.

Examples:

begin <name: letter (letter | digit | "_")*> end
begin <area: digit{3}> "-" <number: digit{3}> "-" digit{4} end
("cat" or "dog" or "bird")

See natural/SYMBOLS.md, natural/GRAMMAR.md, natural/EXAMPLES.md, and natural/COMPATIBILITY.md.

Unknown Natural Form words are rejected. Backend-specific syntax is not silently added to the core language.

Implementations

Verification

test-suites/run-all.sh builds and executes the C, C++, and Java Natural Form tests and verifies the complete 27-object SLeeLa regex source inventory. The Makefile exposes the same verification as make test.

SLeeLa โ€” MEARVK LLC โ€” 2026

Corrections

Fixed so make builds and tests clean under this subproject's -Werror: a Diagnostic*=nullptr default argument mis-tokenized as *=, an over-escaped '\\0' char constant, misleading-indentation, a Java Map.of call exceeding its 10-pair overload (now Map.ofEntries), a non-executable test script, a locale-dependent sort and a dependency on absent cmp, a buggy awk pattern, and wrong test expectations (anchored pattern used for a substring search, plus match-span/capture-count). See the 2026-10-03 entry in ../REVISIONS.md.


SLeeLa

<p align="center"><img src="images/sleela/sleela-wordmark.svg" alt="SLeeLa โ€” The Now. The Ingredient." width="560"></p> <p align="center"><img src="https://github.com/mearvk/SLeeLa/blob/master/images/sleela-programming-language-002.jpg" alt="SLeeLa Marketing Logo" width="560"></p>

Files 34