Lokad.Utf8Regex
0.4.0
Prefix Reserved
dotnet add package Lokad.Utf8Regex --version 0.4.0
NuGet\Install-Package Lokad.Utf8Regex -Version 0.4.0
<PackageReference Include="Lokad.Utf8Regex" Version="0.4.0" />
<PackageVersion Include="Lokad.Utf8Regex" Version="0.4.0" />
<PackageReference Include="Lokad.Utf8Regex" />
paket add Lokad.Utf8Regex --version 0.4.0
#r "nuget: Lokad.Utf8Regex, 0.4.0"
#:package Lokad.Utf8Regex@0.4.0
#addin nuget:?package=Lokad.Utf8Regex&version=0.4.0
#tool nuget:?package=Lokad.Utf8Regex&version=0.4.0
Lokad.Utf8Regex
0.4.0, .NET 10. Regular expressions over strict UTF-8
ReadOnlySpan<byte> / Span<byte>, matching Unicode scalars with primary byte
coordinates. Dot matches 😀 once across four bytes. UTF-16 coordinates and
string APIs are derived interoperability conveniences.
using Lokad.Utf8Regex;
var regex = new Utf8Regex(".");
int count = regex.Count("A😀"u8); // 2
var match = regex.Match("😀"u8); // LengthInBytes == 4
The owned managed engine supports documented .NET-style grammar, captures/history, backreferences, assertions, RTL and a supported NonBacktracking subset, with native UTF-8 search paths. It does not execute BCL Regex matchers/results or promise UTF-16 parity. CultureInvariant is the primary supported mode. Whole subjects must be valid UTF-8, including suffixes after an early match. Core uses ordered alternatives, not POSIX leftmost-longest matching.
Optional IL preparation is skipped when the host disables dynamic code,
including with Compiled; non-emitted execution preserves results. NativeAOT
publishing and trimming have not been qualified.
Replacement callbacks can pass local stack buffers and formatting slices to
Utf8ReplacementWriter.Append. Its scoped byte/char span inputs are copied or
encoded before returning; the writer remains valid only during the callback.
Instances support finite Utf8ResourcePolicy work, depth, working-capacity and
result-capacity limits. Defaults and static cached calls are unlimited.
Original cancellation and absolute deadlines cover validation, matching, required
shaping and cursor advances. Explicit Compile factories offer separate
construction controls. Memory accounting admits modeled major capacity before
allocation; it is not total heap/RSS, all preparation, callbacks or retained-host
storage containment. See resource contract.
Keep borrowed subjects unchanged and their owners alive. Owned snapshots remain valid after advance/failure/disposal. Copied value cursors retain independent positions while sharing allowance/deadline. A host must separately account for retained results and its own storage.
Optional Lokad.Utf8Regex.PythonRe and Lokad.Utf8Regex.Pcre2 0.4.0
require exactly this Core version. Both are managed profile adapters with explicit
compatibility boundaries; no native PCRE2 binary is shipped.
Read release notes and migration guide. The repository specification defines the target contract; qualification fixtures establish implemented scope. Performance snapshots retain their recorded source/package/runtime identities.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Lokad.Utf8Regex:
| Package | Downloads |
|---|---|
|
Lokad.Utf8Regex.PythonRe
Optional Python re companion package for Lokad.Utf8Regex, providing a UTF-8 oriented Python-style regular expression API without forcing Python-specific semantics into the base library. |
|
|
Lokad.Utf8Regex.Pcre2
Optional PCRE2 companion package for Lokad.Utf8Regex, providing a UTF-8 oriented PCRE2 API surface without forcing PCRE2 dependencies onto the base library. |
GitHub repositories
This package is not used by any popular GitHub repositories.
See https://github.com/Lokad/Utf8Regex/blob/master/CHANGELOG.md for release notes.