Scout.Text.Regex
0.6.0
dotnet add package Scout.Text.Regex --version 0.6.0
NuGet\Install-Package Scout.Text.Regex -Version 0.6.0
<PackageReference Include="Scout.Text.Regex" Version="0.6.0" />
<PackageVersion Include="Scout.Text.Regex" Version="0.6.0" />
<PackageReference Include="Scout.Text.Regex" />
paket add Scout.Text.Regex --version 0.6.0
#r "nuget: Scout.Text.Regex, 0.6.0"
#:package Scout.Text.Regex@0.6.0
#addin nuget:?package=Scout.Text.Regex&version=0.6.0
#tool nuget:?package=Scout.Text.Regex&version=0.6.0
Scout.Text.Regex
Scout.Text.Regex provides byte-oriented regular expressions for .NET applications that need predictable search behavior over UTF-8, mixed, or arbitrary byte data.
using Scout.Text.Regex;
ByteRegex regex = ByteRegex.Compile(@"(?m)^Status: ([0-9]+)$");
ByteRegexCaptures? captures = regex.FindCaptures(data);
The engine is backed by Scout's automata implementation and is designed for Native AOT, trimming, and linear-time search.
Compiled ByteRegex and ByteRegexSet instances are safe to share across threads for matching. Callback state passed to iteration APIs remains caller-owned.
Malformed UTF-8 does not participate in Unicode scalar matches by default, matching ripgrep's behavior. Callers that process Go-style byte text can opt into one replacement scalar per malformed byte:
var options = new ByteRegexOptions { MatchInvalidUtf8 = true };
ByteRegex replacement = ByteRegex.Compile(@"\u{FFFD}+", options);
ByteRegexMatch? match = replacement.Find(data);
Every malformed or truncated byte is treated as U+FFFD with a width of one byte. A valid UTF-8 encoding of U+FFFD keeps its three-byte width, and all matches, captures, and values continue to reference the original input bytes. The option has no effect on raw byte operations when both Utf8 and UnicodeClasses are disabled.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Scout.Text.Regex:
| Package | Downloads |
|---|---|
|
Picket.Engine
AOT-safe secret scanning engine for Picket using Scout.Text.Regex for byte-oriented matching. |
GitHub repositories
This package is not used by any popular GitHub repositories.